Св
Светлана
Найдите ошибку!
confirm("Do you ready to play?");
var age promt("How old are you?");
if (age < 18) {
console.log("You can play with us!");
} else {
console.log("You can play with us!");
}
confirm("Do you ready to play?");
var age promt("How old are you?");
if (age < 18) {
console.log("You can play with us!");
} else {
console.log("You can play with us!");
}
Are you ready to play?
входные данные строка, надо привести к числу
Как-то так скорее всего будет
confirm("Do you ready to play?");
var age parseInt(promt("How old are you?"));
if (age) < 18) {
console.log("You cannot play with us!");
} else {
console.log("You can play with us!");
}