You-Dont-Know-JS
You-Dont-Know-JS copied to clipboard
Types & Grammar: Operators || and &&
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.
You have an older version of the book -- fixed in https://github.com/getify/You-Dont-Know-JS/commit/281abfe8ebe6de661c839778488e7cae56cc3e07
@pommesgabel thanks, great catch! :)