Created
March 2, 2018 10:16
-
-
Save AlexLo33/f505c097356832c3241cc0b6b8a8592b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Javascripting</title> | |
</head> | |
<body> | |
</body> | |
<script> | |
(() => { | |
'use strict'; | |
let patates = ""; | |
let response = prompt('Hey mon ami ! Tu aimes ça les patates ?'); | |
switch (response.trim().toLocaleLowerCase()) { | |
case "oui": | |
for (let i = 0; i < 7; i++) { | |
console.log(patates += "#"); | |
} | |
break; | |
case "non": | |
alert('Je suis déçu... moi j\'aime ça !!'); | |
break; | |
default: | |
alert('Je vous sens comme tiraillé...'); | |
} | |
})(); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment