Created
March 13, 2017 16:58
-
-
Save gregoire-bessagnet/274bb0090861b8b16b051e5de4cca3ea to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>MDR JS</title> | |
</head> | |
<body> | |
<p> Hahah ! Petit test de script JS ! <br> | |
<strong>Réponds au prompt si t'es cho patate !</strong></p> | |
<script> | |
var reponse = prompt("Hey mon ami ! Tu aimes ça les patates ?", "<Entrez ici oui ou non>"); | |
if (reponse == "oui"){ | |
var patates = ["#", "#", "#", "#", "#", "#", "#" ]; | |
var tas = []; | |
for (i = 0; i < patates.length; i++) { | |
tas.push(patates[i]); | |
console.log(tas.join("")); | |
} | |
} | |
else if (reponse == "non"){ | |
alert('haha') | |
} | |
else 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