I'll try to explain my thoughts with the help of examples.
The variable var will be null if there is no obj key:
The variable var will be null if there is no obj key or obj exists but no obj.key exists:
The variable var will be null if there is no obj key or throws if there is no obj.key exists:
I'll try to explain my thoughts with the help of examples.
The variable
varwill benullif there is noobjkey:The variable
varwill benullif there is noobjkey orobjexists but noobj.keyexists:The variable
varwill benullif there is noobjkey or throws if there is noobj.keyexists: