Skip to content

Instantly share code, notes, and snippets.

@zeptobook
Created June 17, 2020 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeptobook/eef9f33703d18e856cbf48f0b683659b to your computer and use it in GitHub Desktop.
Save zeptobook/eef9f33703d18e856cbf48f0b683659b to your computer and use it in GitHub Desktop.
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