What condition is necessary to show that `sale` is `true`?

let sale = true;
if (sale){
console.log(‘Time To Buy!’);

Am I doing something wrong here or is it a site issue.

1 Like

NaN works as false with me??

 > NaN && true
<- NaN

AND short-circuits on falsy, so that means NaN is also falsy.

1 Like

Thank you! I was getting hung up on this point also, that we weren’t evaluating anything in the parenthesis, but this makes perfect sense after reading this :pray:

1 Like

Thank you mtf, NaN, I believe should as part of false statement. Correct?

1 Like

Correct. Good catch. It only took 32 months for someone to spot that.

NaN && true  =>  NaN

which indicates a short-circuit; therefore, falsy.

Too late to edit the post, but future readers will be set right if they get down to this one.

For all of you that struggle with the 2nd step of the lesson, the console.log ‘Time to buy!’ you need to use the ‘SINGLE QUOTE’ for the string and not ``