-
-
Save MartinsAlexandre/02a1a8d31ea6e48adf5125d810ddf62c to your computer and use it in GitHub Desktop.
quête js
This file contains 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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>quete js</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
console.log("Entrez : oui ou non"); | |
console.log("Enter : yes or no"); | |
var saisie = prompt("Hey mon ami ! Tu aimes ça les patates ?"); | |
var x = saisie.charAt(0); | |
switch(x){ | |
case "o": | |
case "O": | |
case "y": | |
case "Y": | |
var tag = ""; | |
for(var i = 0; i < 7; i++){ | |
tag = tag + "#"; | |
console.log(tag); | |
} | |
break; | |
case "n": | |
case "N": | |
alert("oh no !!!"); | |
break; | |
default: | |
alert("Je vous sens comme tiraillé"); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment