ES proposal: optional chaining

added by JavaScript Kicks
7/28/2019 6:00:27 PM

333 Views

This blog post describes the ECMAScript proposal "Optional chaining" by Gabriel Isenberg, Claude Pache, and Dustin Savery. The following kinds of optional operations exist. obj?.prop obj?.["expr"] func?.("arg0", "arg1") The rough idea is: If the value before the question mark is neither undefined nor null, then perform the operation after the question mark.


0 comments