New course! Every coder should learn Generative AI!
Try a free lesson+ 6
var x = 10;
x*=2 // x = 20
while loop start
First itration
x < 30 true // x = 20
x+=5 // x = 25
y = x // y = 25
Second itration
x < 30 true // x = 25
x+=5 // x = 30
y = x // y = 30
Third itration
x < 30 false // x =30
FInal x = 30, y = 30
alert (x+y) // 60
+ 1
x = y = 30 in this code.