Recibí un error de tamaño máximo de pila de llamadas excedido en el siguiente código (tengo la intención de ejecutar el bucle recursivo hasta el infinito). ¿Es posible este método o hay una falacia lógica?
const example = ['hello.', 'hi there.']; textSequence(0); function textSequence(i) { if (example.length > i) { $('#welcome').fadeIn(1500); setTimeout(function(){ $('welcome').fadeOut(2500); },4000); $('#welcome').text(example[i]); textSequence(++i); } else if (example.length == i) { textSequence(0); } }