+ 2
Okay, i in the for loop isn't a representation of the array's elements, but the array's indexes. Indexes start from 0, not from 1, so you'll first be multiplying by 0
+ 2
This isn't an enhanced for loop, so if you look at it closely, you don't multiply by arr[i], but by i, which is 0, 1, 2, 3.