Created
May 23, 2018 16:31
-
-
Save jpitchardu/a4555e26d384b86c190a809991f1f2c8 to your computer and use it in GitHub Desktop.
Null-Conditional in JS
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
let obj; | |
console.log(obj && obj.someProp); // Prints undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment