Can someone explain Lesson 12: &&?


There are two posts about this already, but neither of them focused on the part I am confused about or answered it adequately.

The question contains this code:

    {!judgmental && <li>Nacho Cheez Straight Out The Jar</li>}

To simplify it, I ran these tests:

console.log(false && 'test')


console.log(true && 'test')


Can someone explain this? Why wouldn’t the result always be either true or false since it is a condition?


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.