1

I've been trying to find the documentation for when you can use !. in javascript/typescript

I know that instead of doing

if (object && object.property) {

}

We can do using !.

if (object!.property) {

}

Are you able to nest the properties? For example.

object!.property!.name 
Uwe Keim
  • 38,279
  • 56
  • 171
  • 280
Kenneth Truong
  • 3,454
  • 2
  • 24
  • 45

0 Answers0