0

JS snail in the well. help

my code: function main() { var depth = parseInt(readLine(), 10); do (+7-2); while (i< 31) the error: /usercode/file0.js:21 while (i< 31) ^ ReferenceError: i is not defined at main (/usercode/file0.js:21:13) at ReadStream.<anonymous> (/usercode/file0.js:11:5) at ReadStream.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)

17th Nov 2021, 4:32 PM
Jackson Jameson
Jackson Jameson - avatar
2 Respostas
+ 4
Please, don't post questions repeatedly. Your such action may be considered as spam. Read the instructions carefully. Also, check what is applicable in order to solve it. Whether "if-else" statement or "for loop" or "do-while loop". Your code is incomplete. [Here is little help for you]. Check and understand where you made mistake. Also try to use search option: https://www.sololearn.com/discuss/2665192/?ref=app https://www.sololearn.com/discuss/2618113/?ref=app https://www.sololearn.com/discuss/2617598/?ref=app https://www.sololearn.com/discuss/2624694/?ref=app https://www.sololearn.com/discuss/2690678/?ref=app
17th Nov 2021, 4:37 PM
Shivani 📚✍
Shivani 📚✍ - avatar
+ 1
thank you. I did not mean to post it that many times
17th Nov 2021, 4:38 PM
Jackson Jameson
Jackson Jameson - avatar