Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Js Guess Game</title>
- </head>
- <body>
- <script>
- function Received() {
- prompt('Enter a number');
- }
- var input1= parseInt(Received());
- var ans = Math.ceil(Math.random() * 10 + 1);
- if (input1=== ans) {
- document.write("Guess is to high");
- }else {
- document.write("Try Again " + "The Random number is "+ ans);
- Received();
- }
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment