+ 2
I don't get why its output is 10... :
var x=2; for(var i=0; i<4; i++) { x+= 2; } consol.log(x)
3 Answers
+ 2
You can find more about JavaScript loops here:
https://www.sololearn.com/learn/JavaScript/1140/
+ 1
FYI,
You have a typo there:
consol.log(x) - > console.log(x)