Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JavaScripting</title>
  6. </head>
  7. <body>
  8.  
  9. <script type="text/javascript">
  10.  
  11.  
  12. var response = prompt("Hey mon ami ! Tu aimes ça les patates ?");
  13. var patates = "";
  14.  
  15.  
  16. if (response == null){
  17. saitpas();
  18. }
  19.  
  20. if (response == ""){
  21. faux();
  22. }
  23.  
  24. if (response != null || response != ""){
  25. vrai();
  26. }
  27.  
  28.  
  29. function vrai(){
  30. for(var i=1; i <8; i++){
  31. patates = patates + "#";
  32. console.log(patates);
  33. }
  34. }
  35.  
  36. function faux(){
  37. alert("Je vous sens comme tiraillé");
  38. }
  39.  
  40.  
  41. function saitpas(){
  42. alert("Vous n'aimez pas les patates!");
  43. }
  44.  
  45. </script>
  46.  
  47. </body>
  48. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement