Just change the highlighted line from this:
wordIdx === typeStrings.length && clearInterval(interval)
To this:
if (wordIdx === typeStrings.length) wordIdx = 0
Just change the highlighted line from this:
wordIdx === typeStrings.length && clearInterval(interval)
To this:
if (wordIdx === typeStrings.length) wordIdx = 0