Skip to content

Instantly share code, notes, and snippets.

@jpitchardu
Created May 23, 2018 16:31
Show Gist options
  • Select an option

  • Save jpitchardu/76ed632ec5295ae9316252e141d33fbb to your computer and use it in GitHub Desktop.

Select an option

Save jpitchardu/76ed632ec5295ae9316252e141d33fbb to your computer and use it in GitHub Desktop.

Revisions

  1. jpitchardu created this gist May 23, 2018.
    5 changes: 5 additions & 0 deletions type-error.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    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