We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6c9e49 commit 5bc6683Copy full SHA for 5bc6683
script.js
@@ -4,7 +4,7 @@ const logo = document.getElementById("logo");
4
const intervals = new Map();
5
6
// Create spans for each word and its characters
7
-const words = name.split(" ");
+const words = name.match(/(\S+|\s)/g);
8
words.forEach((word) => {
9
const wordSpan = document.createElement("span");
10
wordSpan.classList.add("word");
0 commit comments