loops problem javascript [solved]
Hello, I tried the javascript course, loops part, code project. but my code did not work I don't understand how can I fixed. ------------------------------------------------------------------------------------------------------------- Question: ------------------------------------------------------------------------------------------------------------- The Snail in the Well The snail climbs up 7 feet each day and slips back 2 feet each night. How many days will it take the snail to get out of a well with the given depth? ------------------------------------------------------------------------------------------------------------- my code: ------------------------------------------------------------------------------------------------------------- function main() { var depth = parseInt(readLine(), 10); //your code goes here var day = 0; var snailPosition = 0; var morning = 7; var night = 2; while (True){ snailPosition += morning if(snailPosition >=