I thought these 2 code examples did the same thing. Loop through my array and update all variables with 2. But the second code example made my program work incorrectly.