From 14b1c88aa900a6c9a929add8d3c3f7c625a4d7d7 Mon Sep 17 00:00:00 2001 From: Mathew Date: Thu, 20 Apr 2017 11:02:19 -0700 Subject: [PATCH] fixed last letter not being processed --- index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index b3625db..e9fe7af 100644 --- a/index.html +++ b/index.html @@ -34,7 +34,9 @@ { el.innerHTML = el.innerHTML+words[word_counter][character_counter++]; - if(character_counter == words[word_counter].length) + console.log(character_counter); + + if(character_counter - 1 == words[word_counter].length) { word_counter++; //choose a different word character_counter = 0; //start over with the first character of the word