Skip to content

Commit 5bc6683

Browse files
Update script.js
1 parent f6c9e49 commit 5bc6683

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const logo = document.getElementById("logo");
44
const intervals = new Map();
55

66
// Create spans for each word and its characters
7-
const words = name.split(" ");
7+
const words = name.match(/(\S+|\s)/g);
88
words.forEach((word) => {
99
const wordSpan = document.createElement("span");
1010
wordSpan.classList.add("word");

0 commit comments

Comments
 (0)