0

why does this not work

var i= 0 for (;depth >0;){ i++ depth -=7 if (depth > 0){ depth +=2.2 console.log (i); } } }

27th Mar 2022, 10:56 PM
Garrett Adams
2 Answers
+ 1
// hope this code helps you let depth=37; for (let i= 0; depth>0; i++){ depth -=7; if (depth>0){ depth +=2.2; console.log(i, depth); } }
27th Mar 2022, 11:03 PM
SoloProg
SoloProg - avatar
+ 1
27th Mar 2022, 11:07 PM
SoloProg
SoloProg - avatar