Moocable is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Optional Chaining

Description

Optional chaining ?. in javascript is a new feature introduced in ES2020. Optional chaining changes the way properties are accessed from deeply nested objects. It fixes the problem of having to do multiple null checks when accessing long chain of object properties in javascript.

Tags

Syllabus

  • Enable JavaScript Experimental Features in Chrome
  • Enable optional chaining in Node app by using Babel
  • Access Long Chains of Properties with JavaScript Optional Chaining
  • Provide Default Values with Optional Chaining and Null Coalescing in JavaScript

Online Course


Optional Chaining

Affiliate notice

Optional chaining ?. in javascript is a new feature introduced in ES2020. Optional chaining changes the way properties are accessed from deeply nested objects. It fixes the problem of having to do multiple null checks when accessing long chain of object properties in javascript.

  • Enable JavaScript Experimental Features in Chrome
  • Enable optional chaining in Node app by using Babel
  • Access Long Chains of Properties with JavaScript Optional Chaining
  • Provide Default Values with Optional Chaining and Null Coalescing in JavaScript