Skip to main content
added 2 characters in body
Source Link
Damjan Pavlica
  • 34.6k
  • 10
  • 76
  • 82

The optional chaining operator (?.?.) was introduced in ES2020. Now, you should be able to write:

const myVal = appData?.foo?.bar?.setting 

The optional chaining operator (?.) was introduced in ES2020. Now, you should be able to write:

const myVal = appData?.foo?.bar?.setting 

The optional chaining operator (?.) was introduced in ES2020. Now, you should be able to write:

const myVal = appData?.foo?.bar?.setting 
Source Link
Damjan Pavlica
  • 34.6k
  • 10
  • 76
  • 82

The optional chaining operator (?.) was introduced in ES2020. Now, you should be able to write:

const myVal = appData?.foo?.bar?.setting