Skip to content

Instantly share code, notes, and snippets.

@AlexLo33
Created March 2, 2018 10:16
Show Gist options
  • Save AlexLo33/f505c097356832c3241cc0b6b8a8592b to your computer and use it in GitHub Desktop.
Save AlexLo33/f505c097356832c3241cc0b6b8a8592b to your computer and use it in GitHub Desktop.
<!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