2nd Aug 2021, 1:29 PM
Coder
Coder - avatar
3 Respostas
+ 6
//try this for (;climb<depth;day++){ climb+=7-2 } console.log (day)
2nd Aug 2021, 1:33 PM
Simba
Simba - avatar
+ 1
Simba Thanks -> This one also looking Cool -| ^ for (;climb<depth;climb+=7,day++){ climb -= 2;
2nd Aug 2021, 1:38 PM
Coder
Coder - avatar
0
With just one if statment , you dont need for loop at all : if (depth%5<3){ var days=depth/5; }else{ var days=(depth/5)+1; } console.log(parseInt(days));
4th Dec 2021, 6:16 AM
Murtada abed
Murtada abed - avatar