Welcome and sorry for answering so late.
Maybe you already solved this issue. Just in case, here are some hints :
- You should always give an initial value to variables subsequently updated with the
- The index for iterating over an array or a string must vary from 0 to
size of array - 1.