It is better to use the length attribute of the array to compute positions in the array instead of hardcoding a literal like 9 or 10. If you change the size of the array, your code won't work.
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656