Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <title>hofeherke</title>
- </head>
- <body>
- <script id="jsbin-javascript">
- function rosieTheFortuneTeller () {
- var name = prompt('Hi, dear! My name is Rosie and I am an expert fortune teller. What is your name?');
- 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.');
- alert('Hmm... '+choose+'. Excellent choice. Let us see what your future holds.');
- if(choose == 'turtle'){
- alert('Here is your fortune: Don\'t panic.');
- } else if (choose == 'rose'){
- alert('Here is your fortune: You will find a thing. It may be important.');
- } else if (choose == 'teacup'){
- alert('Here is your fortune: The end is near, might as well have dessert.');
- } else if (choose == 'moon'){
- alert('Here is your fortune: Look before you leap. Or wear a parachute. ');
- } else{
- alert('I am sorry, '+choose+'. I do not think I understand you correctly. Are you sure you typed in one of the offered possibilities?');
- }
- return;
- };
- rosieTheFortuneTeller();
- </script>
- <script id="jsbin-source-javascript" type="text/javascript">function rosieTheFortuneTeller () {
- var name = prompt('Hi, dear! My name is Rosie and I am an expert fortune teller. What is your name?');
- 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.');
- alert('Hmm... '+choose+'. Excellent choice. Let us see what your future holds.');
- if(choose == 'turtle'){
- alert('Here is your fortune: Don\'t panic.');
- } else if (choose == 'rose'){
- alert('Here is your fortune: You will find a thing. It may be important.');
- } else if (choose == 'teacup'){
- alert('Here is your fortune: The end is near, might as well have dessert.');
- } else if (choose == 'moon'){
- alert('Here is your fortune: Look before you leap. Or wear a parachute. ');
- } else{
- alert('I am sorry, '+choose+'. I do not think I understand you correctly. Are you sure you typed in one of the offered possibilities?');
- }
- return;
- };
- rosieTheFortuneTeller();</script></body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement