100-project-100-days-website/100_projects/9-javaScript-auto-write-text/script.js
2023-03-02 17:26:29 +03:00
Ask

11 lines
265 B
JavaScript

{12df1a09305a362abd4b28c0462c21484519d454 true 265 script.js 0xc001e4e850}

const text = "She Is My Queen I Love Her Eyes So Much 🤍 ";
let index = 0;
function writeText() {
document.body.innerText = text.slice(0, index);
index++;
if (index > text.length) {
index = 0;
}
}
setInterval(writeText, 100);