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

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

Please help me Refine the calculator. When you enter letters, you need to ask them to enter again until you enter a number. –ü—Ä–ĺ—ą—É –Ņ–ĺ–ľ–ĺ—Č–ł –≤ –ī–ĺ—Ä–į–Ī–ĺ—ā–ļ–Ķ –ļ–į–Ľ—Ć–ļ—É–Ľ—Ź—ā–ĺ—Ä–į. –Ě—É–∂–Ĺ–ĺ —á—ā–ĺ–Ī—č –Ņ—Ä–ł –≤–≤–ĺ–ī–Ķ –Ī—É–ļ–≤ –Ņ—Ä–Ķ–ī–Ľ–į–≥–į—ā—Ć –Ķ—Č–Ķ —Ä–į–∑ –≤–≤–Ķ—Ā—ā–ł, –Ņ–ĺ–ļ–į –Ĺ–Ķ –≤–≤–Ķ–ī–Ķ—ā–Ķ —Ü–ł—Ą—Ä—É.

20th Nov 2020, 1:05 PM
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź - avatar
3 Réponses
20th Nov 2020, 1:08 PM
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź - avatar
+ 1
Why not use <input type="number"> for the width, length and height? once the button is clicked you validate the three values and proceed when all is OK. Running a loop asking for input over and over again can be annoying. (Edit) Please use the tags properly, you can put code link in Description and use the tags to specify a language name instead ūüĎć
20th Nov 2020, 1:18 PM
Ipang
+ 1
Thanks, I'll try it now.
20th Nov 2020, 1:30 PM
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź
–ú–į—Ä–ł–Ĺ–į –ď–ĺ—Ä–ī–ł–Ĺ—Ā–ļ–į—Ź - avatar