Skip to content

Commit

Permalink
fireship-io#1701 fixed readme to display proper error message
Browse files Browse the repository at this point in the history
  • Loading branch information
pvudharam2 committed May 8, 2024
1 parent f6cbb49 commit df961ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/courses/js/102-optional-chaining.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Optional chaining `?` is a relatively new operator that was introduced in ES2020
const person = { };

const dude = person.name;
console.log(foo); // Uncaught TypeError: Cannot read property 'bar' of undefined
console.log(foo); // Uncaught TypeError: Cannot read property 'foo' of undefined

const dude = person?.name; // undefined
dude = person?.name; // undefined
```

0 comments on commit df961ce

Please sign in to comment.