()
| 57 | } |
| 58 | |
| 59 | function run(){ |
| 60 | //run the reader |
| 61 | interval = setInterval(function(){ |
| 62 | |
| 63 | // If there are no more words, stop |
| 64 | if (!words[current]) { |
| 65 | end(); |
| 66 | return; |
| 67 | } |
| 68 | |
| 69 | //display the words to ui |
| 70 | readerElem.textContent = words[current]; |
| 71 | |
| 72 | //go to next word |
| 73 | current++; |
| 74 | |
| 75 | }, speed); |
| 76 | } |