+ 9
The first item in that loop is 0. After printing the first item, the return statement exits the function before the next loop iteration. This is why the output is 0.
2nd Mar 2018, 7:46 AM
David Carroll
David Carroll - avatar