0
looping used forloop in javascript
anyone can explain why the result 17?, please explain to me, I am still confused with the looping. https://code.sololearn.com/W695XUwGItIM/?ref=app
1 Resposta
+ 1
let result = 0;
for(let i = 0; i < 5; i++){
if(i == 3){
result += 10;
}else{
result += i;
}
}
document.write(result);
1+2+10+4=17