Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width">
  6. <title>hofeherke</title>
  7. </head>
  8. <body>
  9.  
  10. <script id="jsbin-javascript">
  11. function rosieTheFortuneTeller () {
  12. var name = prompt('Hi, dear! My name is Rosie and I am an expert fortune teller. What is your name?');
  13. var choose = prompt('Yes, I have seen that you would come to me, '+name+'. Now please, choose one from the following and type it in the box: turtle, rose, teacup, moon.');
  14. alert('Hmm... '+choose+'. Excellent choice. Let us see what your future holds.');
  15. if(choose == 'turtle'){
  16. alert('Here is your fortune: Don\'t panic.');
  17. } else if (choose == 'rose'){
  18. alert('Here is your fortune: You will find a thing. It may be important.');
  19. } else if (choose == 'teacup'){
  20. alert('Here is your fortune: The end is near, might as well have dessert.');
  21. } else if (choose == 'moon'){
  22. alert('Here is your fortune: Look before you leap. Or wear a parachute. ');
  23. } else{
  24. alert('I am sorry, '+choose+'. I do not think I understand you correctly. Are you sure you typed in one of the offered possibilities?');
  25. }
  26. return;
  27. };
  28.  
  29. rosieTheFortuneTeller();
  30. </script>
  31.  
  32.  
  33.  
  34. <script id="jsbin-source-javascript" type="text/javascript">function rosieTheFortuneTeller () {
  35. var name = prompt('Hi, dear! My name is Rosie and I am an expert fortune teller. What is your name?');
  36. var choose = prompt('Yes, I have seen that you would come to me, '+name+'. Now please, choose one from the following and type it in the box: turtle, rose, teacup, moon.');
  37. alert('Hmm... '+choose+'. Excellent choice. Let us see what your future holds.');
  38. if(choose == 'turtle'){
  39. alert('Here is your fortune: Don\'t panic.');
  40. } else if (choose == 'rose'){
  41. alert('Here is your fortune: You will find a thing. It may be important.');
  42. } else if (choose == 'teacup'){
  43. alert('Here is your fortune: The end is near, might as well have dessert.');
  44. } else if (choose == 'moon'){
  45. alert('Here is your fortune: Look before you leap. Or wear a parachute. ');
  46. } else{
  47. alert('I am sorry, '+choose+'. I do not think I understand you correctly. Are you sure you typed in one of the offered possibilities?');
  48. }
  49. return;
  50. };
  51.  
  52. rosieTheFortuneTeller();</script></body>
  53. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement