Why this returns 103 and not 102? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why this returns 103 and not 102?

var x = 1 for(x; x<=10; x++){ x+=x+100 } console.log(x)

19th Jan 2022, 5:42 AM
Theoz
Theoz - avatar
1 Answer
+ 3
x = 1 x += 101 x++ console.log(x)
19th Jan 2022, 5:49 AM
Mafdi
Mafdi - avatar