+ 1

Can someone pls explain how this code works and what's the answer?

Fill in the blanks to print EVEN values from 0 to 20 using a for loop: var x = 0; for (; x <= _; x += _) { document.write(x); }

12th Nov 2020, 3:11 PM
R. Krishna
1 Antwort
+ 6
R. Krishna this is a simple "for loop" rather you use odd or even numbers example: var x=0; for (;x<=5;x+=1){ document.write(x); } will print 012345
12th Nov 2020, 3:20 PM
BroFar
BroFar - avatar