en.javascript.info/1-js/02-first-steps/12-while-for/6-repeat-until-correct/task.md
2017-08-17 21:58:12 -04:00

468 B

importance: 5


Repeat until the input is correct

Write a loop which prompts for a number greater than 100. If the visitor enters another number -- ask him to input again.

The loop must ask for a number until either the visitor enters a number greater than 100 or cancels the input/enters an empty line.

Here we can assume that the visitor only inputs numbers. There's no need to implement a special handling for a non-numeric input in this task.

[demo]