ES proposal: Nullish coalescing for JavaScript

added by JavaScript Kicks
8/20/2019 7:21:52 AM

190 Views

This blog post describes the ECMAScript feature proposal "Nullish coalescing for JavaScript" by Gabriel Isenberg. It proposes the ?? operator that replaces || when it comes to providing default values. The result of actualValue ?? defaultValue is: Examples: > undefined ?? 'default' 'default' > null ?? 'default' 'default' > false ??


0 comments