You-Dont-Know-JS icon indicating copy to clipboard operation
You-Dont-Know-JS copied to clipboard

Types & Grammar: Operators || and &&

Open astericky opened this issue 12 years ago • 2 comments

The sentence that reads “But the || expression itself results in null (the value in c), not in the coerced false used in the test”. Right after you quote the ES5 Spec section 11.11 and do an example which c || b returns the “abc” from b.

astericky avatar Nov 16 '14 20:11 astericky

You have an older version of the book -- fixed in https://github.com/getify/You-Dont-Know-JS/commit/281abfe8ebe6de661c839778488e7cae56cc3e07

cobalamin avatar Nov 16 '14 20:11 cobalamin

@pommesgabel thanks, great catch! :)

getify avatar Nov 16 '14 20:11 getify