Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <script src="potatoes.js"></script>
- <title> POTATES</title>
- </head>
- <body>
- <script>
- var answer = prompt("Hey mon ami ! Tu aimes ça les patates ? ").toLowerCase();
- var potatoes = ["#","##","###","####","#####", "######", "#######"];
- var potatoesPile = "";
- if (answer=="oui") {
- for (i=0; i < potatoes.length; i++) {
- potatoesPile = potatoesPile + potatoes[i] + "\n";
- }
- }
- else if (answer=="non") {
- potatoesPile = alert("Tu as tort, les patates, c'est la vie...")
- }
- else
- potatoesPile = alert("Je vous sent comme tiraillé...")
- console.log(potatoesPile);
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment