 pausTime = 1000; //pause time
      const target = document.getElementById("textTarget");

      function typeLoop() {
        const currentText = texts[currTextIdx];

        if (isDelete) {
          target.textContent = currentText.substring(0, charIdx--);
        } else {
          target.textContent = currentText.substring(0, charIdx++);
        }
        //typed full character
        if (!isDelete && charIdx === currentText.length + 1) {
          setTimeout(() => {
            isDelete = true;
    