How would I make a timer to print the word Loading? By one letter every second?
example: L then another second and then o then another second and then a..
ETC
How would I make a timer to print the word Loading? By one letter every second?
example: L then another second and then o then another second and then a..
ETC
Try this:
var msg="Loading";
var index=0;
setInterval(function(){ index++;console.log(msg.substring(0,index)) },1000);