2022-2023/1NSI/08_Interaction_web/script/1E_condi.js

9 lines
181 B
JavaScript
Raw Normal View History

let age = prompt("Quel age as tu?")
if (age === 10) {
console.log("Tu as 10ans!")
} else if (age > 18) {
alert("Va voter!")
} else {
console.log("C'est pour bientot")
}