Yes or no questions
Is the shop open? Is the password long enough? Is this person over 18? Programs constantly ask yes/no questions. Today you'll learn how JavaScript answers them.
true and false
JavaScript has a special kind of value with only two options: true and false. It's called a boolean.
const isOpen = true; const isRaining = false; console.log(isOpen, isRaining);
Boolean variable names often start with is, has or can: isOpen, hasTicket, canVote. They read like a question.