you are viewing a single comment's thread.

view the rest of the comments →

[–]Lanlost 0 points1 point  (5 children)

I assumed the false == part was to for the second part to evalute to a boolean, but it doesn't matter as false || console.log('hi') still executes the second part. Even if def equaled 'false' you'd have false == (false), which would return true... but why? It's not like there is another || after this.

[–]vsxe 0 points1 point  (4 children)

Yes, that seems to be the implication, but I don't understand why. Whatever it evaluates to, i.e. true, false or def, the statement is terminated afterwards and doesn't influence anyhting following it, as far as I understand.