- 1
Why does this for loop not work?
var depth=42; var i=0; var k=0; for (; i<depth; i+7){ k++; if (i>=depth){ break; }else{ i-=2; } } console.log(k)
2 Answers
+ 2
Stas Fe , change in the loop => i+= 7 or i = i + 7.
0
TheWh¡teCat 🇧🇬 thank you. That's it. I'm so dumb 😅



