Created
May 23, 2018 16:32
-
-
Save jpitchardu/18b554bfbc1e50f731a430397e857455 to your computer and use it in GitHub Desktop.
Deep null-check in javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log( obj && obj.prop1 && obj.prop1.prop2 && obj.prop1.prop2.prop3 ); // => undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment