JS prompt - calculator (–ļ–į–Ľ—Ć–ļ—É–Ľ—Ź—ā–ĺ—Ä) | Sololearn: Learn to code for FREE!
+ 1

JS prompt - calculator (–ļ–į–Ľ—Ć–ļ—É–Ľ—Ź—ā–ĺ—Ä)

Help me, please. How to do in the calculator if you have not entered a number, then offer to enter again until you enter a number. And that would not count either 0 or nan. –ü–ĺ–ľ–ĺ–≥–ł—ā–Ķ –ľ–Ĺ–Ķ, –Ņ–ĺ–∂–į–Ľ—É–Ļ—Ā—ā–į. –ö–į–ļ –≤ –ļ–į–Ľ—Ć–ļ—É–Ľ—Ź—ā–ĺ—Ä–Ķ —Ā–ī–Ķ–Ľ–į—ā—Ć –Ķ—Ā–Ľ–ł –≤–≤–Ķ–Ľ–ł –Ĺ–Ķ —Ü–ł—Ą—Ä—É, —ā–ĺ –Ņ—Ä–Ķ–ī–Ľ–į–≥–į—ā—Ć –Ķ—Č–Ķ —Ä–į–∑ –≤–≤–Ķ—Ā—ā–ł, –Ņ–ĺ–ļ–į –Ĺ–Ķ –≤–≤–Ķ–ī–Ķ—ā —Ü–ł—Ą—Ä—É. –ė —á—ā–ĺ –Ī—č –Ĺ–Ķ —Ā—á–ł—ā–į–Ľ –ł–Ľ–ł 0 –ł–Ľ–ł nan.

16th Nov 2020, 9:11 PM
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź - avatar
6 Réponses
+ 5
Ok, here's my solution, I'm using the do...while statement: https://code.sololearn.com/W45ToHTR466g/?ref=app
16th Nov 2020, 9:34 PM
CoffeeByte
CoffeeByte - avatar
16th Nov 2020, 9:45 PM
CoffeeByte
CoffeeByte - avatar
+ 4
I can't open the code, please insert it clicking the insert button.
16th Nov 2020, 9:19 PM
CoffeeByte
CoffeeByte - avatar
16th Nov 2020, 9:23 PM
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź - avatar
+ 1
Thank you, this is what I need. What can you do with the cancel function? If you press it, it counts 0
16th Nov 2020, 9:42 PM
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź - avatar
+ 1
Thanks, I'll try
16th Nov 2020, 9:49 PM
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź - avatar