+ 1
How does the for loop work for printing even numbers in javascript
2 Answers
+ 4
for i n range(100):
if i%2 == 0: # the number is divisible by 2
print(i)
+ 5
It depends on the language. Most allow steps of 2 so start with an even and it only gives evens.