Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>JavaScripting</title>
- </head>
- <body>
- <script type="text/javascript">
- var response = prompt("Hey mon ami ! Tu aimes ça les patates ?");
- var patates = "";
- if (response == null){
- saitpas();
- }
- if (response == ""){
- faux();
- }
- if (response != null || response != ""){
- vrai();
- }
- function vrai(){
- for(var i=1; i <8; i++){
- patates = patates + "#";
- console.log(patates);
- }
- }
- function faux(){
- alert("Je vous sens comme tiraillé");
- }
- function saitpas(){
- alert("Vous n'aimez pas les patates!");
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement