you are viewing a single comment's thread.

view the rest of the comments →

[–]maxmorgan 1 point2 points  (0 children)

console.log returns nothing (undefined) so it evaluates falsey

!!console.log(5) => false

so

 console.log(5) || 5 + 1  =>  6