FAQ: Conditional Statements - The if keyword

when you create a condition
if (true) {
console.log(‘Time to buy!’);
},

what you are saying is that the code should run as long as the value (true) is true.

That means you can even delete the variable sale and the code will run because “true” is not a variable, it is a value and “true” will always be “true”

Rem: ‘sale’ is a variable holding a value called ‘true’ meaning sale depends on true.

But true is a value on its own and can function on its own

let sale = true;

if (sale) {
console.log(‘Time to buy!’);
}