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
  • 39,551
  • 56
  • 175
  • 291
Kenneth Truong
  • 3,882
  • 3
  • 28
  • 47

0 Answers0