let sale = true;
if (sale){
console.log(‘Time To Buy!’);
}
Am I doing something wrong here or is it a site issue.
let sale = true;
if (sale){
console.log(‘Time To Buy!’);
}
Am I doing something wrong here or is it a site issue.
NaN works as false with me??
> NaN && true
<- NaN
AND short-circuits on falsy, so that means NaN
is also falsy.
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
Thank you mtf, NaN, I believe should as part of false statement. Correct?
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 ``