JSFiddle - React, Tailwind, and code Playground
by mblase75
HTML
<div id="console_div"></div>
JavaScript
var text = new Array();
text[0] = "welcome ";
text[1] = "how are you?";
var delay = 400;
var textstr = text.join('');
function addOneChar(i) {
$('#console_div').append('<br>' + textstr.charAt(i));
if (i+1<textstr.length) {
setTimeout(function () {
addOneChar(i+1);
}, delay);
} // else quit
}
setTimeout(function () {
addOneChar(0);
});