Skip to content

Instantly share code, notes, and snippets.

@jpitchardu
Created May 23, 2018 16:31
Show Gist options
  • Save jpitchardu/76ed632ec5295ae9316252e141d33fbb to your computer and use it in GitHub Desktop.
Save jpitchardu/76ed632ec5295ae9316252e141d33fbb to your computer and use it in GitHub Desktop.
Type Error in JS
let obj;
console.log(obj.someProp); // => TypeError: Cannot read property 'someProp' of undefined
obj = null;
console.log(obj.someProp); // => TypeError: Cannot read property 'someProp' of null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment