Skip to content

Instantly share code, notes, and snippets.

@MartinsAlexandre
Last active March 3, 2018 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinsAlexandre/02a1a8d31ea6e48adf5125d810ddf62c to your computer and use it in GitHub Desktop.
Save MartinsAlexandre/02a1a8d31ea6e48adf5125d810ddf62c to your computer and use it in GitHub Desktop.
quête js
<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