Created
June 17, 2020 19:42
-
-
Save zeptobook/eef9f33703d18e856cbf48f0b683659b to your computer and use it in GitHub Desktop.
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
person = null; | |
console.log(person[0]); // error: Uncaught TypeError: Cannot read property '0' of null | |
// or | |
person = ['adam', 'robert']; | |
console.log(person[2]); // error: Uncaught TypeError: Cannot read property '0' of null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment