<!DOCTYPE html>
<html lang="en">
<head>
<title>Javascript</title>
<meta charset="utf-8">
</head>
<body>
<script>
var reponse = prompt("Hey mon ami ! Tu aimes ça les patates ?", "Entrez Oui ou Non (Enter Yes or No)");
if (reponse.charAt(0) === 'O' || reponse.charAt(0) ==='o' || reponse.charAt(0) ==='Y' || reponse.charAt(0) ==='y') {
var somme = '';
for (var i=0; i <= 6; i++) {
somme += '#';
console.log(somme);
}
}
else if (reponse.charAt(0) === 'N' || reponse.charAt(0) ==='n'){
alert("Oh... :(");
}
else {
alert("Je vous sens comme tiraillé.");
};
</script>
</body>
</html>