0

Can't understand what data we have in 23rd lesson and what to do there. JavaScript.

4th Aug 2021, 10:28 AM
Никита Планшетов
Никита Планшетов - avatar
6 Respostas
+ 4
Никита Планшетов , can you please specify the programming language in a tag? thanks!
4th Aug 2021, 10:40 AM
Lothar
Lothar - avatar
+ 1
Are you talking about snail in the well?
4th Aug 2021, 12:12 PM
Anthony Johnson
Anthony Johnson - avatar
+ 1
Yeah
5th Aug 2021, 4:58 AM
Никита Планшетов
Никита Планшетов - avatar
+ 1
What i did was make a few variables. Day for how many days have passed. Distance for how how much it travels during the day. Night for the distance to subtract every time it hasnt reached the depth. And total to keep track of the distance for every nigjt and day. And put that all in a for loop.
5th Aug 2021, 6:45 PM
Anthony Johnson
Anthony Johnson - avatar
+ 1
Thanks. Were you using if- and else-statements?
6th Aug 2021, 5:02 AM
Никита Планшетов
Никита Планшетов - avatar
0
Just an if statement. “If a particular condition hasnt been met. Continue the loop.
6th Aug 2021, 2:10 PM
Anthony Johnson
Anthony Johnson - avatar