Forum : Write a JavaScript code, - for guessing any number between 1 to 20. run the loop till you not get correct number. Use prompt() box to input number from user.
Brief description  about Online courses   join in Online courses
View vinaykumar B patil 's Profile

Write a JavaScript code, - for guessing any number between 1 to 20. run the loop till you not get correct number. Use prompt() box to input number from user.

can any one clear the question please..
Asked by vinaykumar B patil | Dec 10, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Vinay,

- for guessing any number between 1 to 20. run the loop till you not get correct number. Use prompt() box to input number from user.

Use one prompt box, get user input and check whether the number is in range 1-20, if yes run the loop by printing some message and exit the loop at user entered stage. and in else condition alert error message.
Dec 13, 2010