Practice ยท 5 of 5
Debug: the loop that skips and lies
Two bugs live in firstEven(int[] values), which must return the index of the first even number or -1: it currently skips odd numbers at the wrong moment, and it uses <= at the boundary. Diagnose by reading, fix, verify with the tests.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Practice: Loops