init
This commit is contained in:
11
text_horror/app.js
Normal file
11
text_horror/app.js
Normal file
@@ -0,0 +1,11 @@
|
||||
var i = 0;
|
||||
var txt = 'Hello welcome to TextHorror!';
|
||||
var speed = 50;
|
||||
|
||||
function typeWriter() {
|
||||
if (i < txt.length) {
|
||||
document.getElementById("bubble").innerHTML += txt.charAt(i);
|
||||
i++;
|
||||
setTimeout(typeWriter, speed);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user