I am trying to put a name letter by letter with a delay of one second.
let nombre = document.getElementById('nombre').value; //Mario
for (let i = 0; i < nombre.length; i++) {
setInterval(function(){name.innerHTML +=nombre.charAt(i); }, 1000);
//alert(name.innerHTML);
}
What happens here is that it pauses for 1 second and then paints the name.
What I'm looking for is to put theM -> pase 1 segundo -> a -> pase 1 segundo -> r -> pase 1 segundo -> i -> pase 1 segundo -> o