Common Mistakes
Omitting semi-colons in ‘for’ header.
Mixing up semi-colons with commas in ‘for’ header.
Off-by-one error, where the loop executes one more or one fewer iteration than intended. How many iterations does this loop execute?
Previous slide
Next slide
Back to first slide
View graphic version