Guest User

Untitled

a guest
Mar 17th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <script src="potatoes.js"></script>
  6. <title> POTATES</title>
  7. </head>
  8. <body>
  9. <script>
  10. var answer = prompt("Hey mon ami ! Tu aimes ça les patates ? ").toLowerCase();
  11. var potatoes = ["#","##","###","####","#####", "######", "#######"];
  12. var potatoesPile = "";
  13.  
  14. if (answer=="oui") {
  15. for (i=0; i < potatoes.length; i++) {
  16. potatoesPile = potatoesPile + potatoes[i] + "\n";
  17. }
  18. }
  19. else if (answer=="non") {
  20. potatoesPile = alert("Tu as tort, les patates, c'est la vie...")
  21. }
  22. else
  23. potatoesPile = alert("Je vous sent comme tiraillé...")
  24.  
  25.  
  26. console.log(potatoesPile);
  27. </script>
  28. </body>
  29. </html>
Add Comment
Please, Sign In to add comment