Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 3
    true in the strict sense, but as other answers have noted JavaScript's logical OR operator can behave as sort of a false -coalescing operator, allowing you to achieve the same brevity in many situations.
    – Shog9
    Commented Jul 7, 2011 at 16:40
  • 1
    This is not a null-coalescing operator. Null-coalescing only works on a single value, not on a chain of property access/function invocations. You can already do null-coalescing with the logical OR operator in JavaScript.
    – user19302
    Commented Nov 18, 2016 at 21:52
  • No, you can do false-coalescing with the logical OR in JavaScript.
    – andresp
    Commented May 15, 2017 at 13:45