Not quite understanding why wouldn’t write
If (sale === true)
instead of
if (sale)
at the beginning.
It doesn’t seem to make sense. Can anyone explain the logic there?
I let sale = true;
sale = false;
if(sale) {
console.log(‘Time to buy!’);
} else {
console.log (‘Time to wait for a sale.’)
}