Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>
- Whoa math?
- </title>
- </head>
- <body>
- <script type="text/javascript">
- var num="0";sum="0";
- if(confirm("Would you like to add a string of numbers?")==true){while
- (num!="done"){sum+=parseInt(num);num=prompt("Enter a number, or type
- done to see the results", "");}else{alert("You're no fun.");}alert
- (sum);
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment