Guest User

Untitled

a guest
Jan 24th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2. var num=0;sum=0;
  3. if(confirm("Would you like to add a string of
  4.  
  5. numbers?")==true){while(num!="done"){sum+=parseInt(num);num=prompt
  6.  
  7. ("Enter a number, or type done to see the results", "");}else{alert
  8.  
  9. ("You're no fun.");}alert(sum);
  10. </script>
Add Comment
Please, Sign In to add comment