I have no knowledge in coding, can some help me out ? Here's my code, can someone tell me what's wrong with my code or how I can correct it and make it work.
let i = 0, interval = 100, pause = 5000;
const text = "My text.";
const runTyping = (ms) => setTimeout(() => showText(), ms);
function showText(){
$w("#text1").text = text.slice(0, i);
i = (i + 1) % (text.length + 1);
i > 0 ? runTyping(interval) : runTyping(pause);
}
$w).onReady(() => runTyping(interval));
let j = 0, interval2 = 100, pause2 = 5000;
const text2 = "Another text ";
const runTyping2 = (ms) => setTimeout(() => showText2(), ms);
function showText2(){
$w("#text4").text2 = text2.slice(0, j);
j = (j + 1) % (text2.length + 1);
j > 0 ? runTyping2(interval2) : runTyping2(pause2);
}
$w.onReady(() => runTyping(interval2));
SOLUTION can be found here...