This is the code that I have and I want to make it so that the letters (sentence parameter) type themselves one by one. Not all at a time. I keep trying with setTimeout() but I can't do it so that it keeps it's progress. Please help.
var letters = [];
function typeOut(sentence, code) {
$('body').append('<p id=' + code + '></p>');
for (i = 0; i < sentence.length; i++) {
letters[i] = sentence[i];
$('#' + code).append(letters[i]);
}
}
typeOut("Hello World", 1);
Thanks in advance!