Modify this code

Seems like a code from J.D.

let i = 0;
let interval = 100;
let pause = 5000;
const text = "My text is here. Yes, it's here.";

let runTyping = ms => setTimeout(() => showText(), ms);

console.log(runTyping());
    
    function showText() {
        //let text = "xxx";
        //text = text.slice(0, i);
        $w("#text1").text = text.slice(0, i);
        i = (i + 1) % (text.length + 1);
        i > 0 ? runTyping(interval) : runTyping(pause); 
    } 
    
    $w.onReady(() =>{runTyping(interval)});

J.D. your code-signature ? :grin:

@thestrokestudio

  1. Put a TEXT-ELEMENT onto your page.
  2. Add the formated CODE to your PAGE.
  3. Click —> PREVIEW!
  4. HAVE FUN!