Code:
var a = 0; prompt("Введите свой возраст ниже",a); if (a<18) { alert("Вам сюда нельзя!"); } else { alert("Добро пожаловать!"); }
For some reason, the condition is always satisfied, if we declare a variable and, without assigning a value, it works normally. Why?