You always need to be careful when you play with array indexes, especially if you use the plus sign when calculating the index.


arr1.length+i

This piece of code above will most likely cause...