3 ms·
Agreed! A simple for-loop can be complicated. First, they need to understand that a for-loop instantiates a variable (i). Then they need to understand that th
by mercer 10y ago
Agreed!
A simple for-loop can be complicated.
First, they need to understand that a for-loop instantiates a variable (i). Then they need to understand that the next step is a limit: i < something. And then they need to understand that i++ means increment i every time that the below code is run.
Nevermind that it makes more sense to go: i = 0, i = I + 1, i < something, that's how it works.
Of course if they don't get that, they may not be cut out for programming. But its far from intuitive.