csudh-2 / csudh-2.github.io

Other
0 stars 4 forks source link

Javascript bug in the interactive poem #2

Open paulproteus opened 5 years ago

paulproteus commented 5 years ago

Expected behavior: It should go back to the beginning of the poem when you click the last line.

Actual behavior: It says "undefined" and then gets stuck there.

I think the problem is in poem.js. Can somebody fix this?

lordgandalf56 commented 5 years ago

I will work on this issue.

lordgandalf56 commented 5 years ago

There was an issue with the array. To make array rotate, it was modified to document.getElementById("line").innerHTML=poem[line%poem.length];