Skip to content

Commit 57bca21

Browse files
committed
Little fix to the answer explanation of question 119
1 parent 570f2df commit 57bca21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3856,7 +3856,7 @@ With the optional chaining operator `?.`, we no longer have to explicitly check
38563856
`person.pet?.name`: `person` has a property named `pet`: `person.pet` is not nullish. It has a property called `name`, and returns `Mara`.
38573857
`person.pet?.family?.name`: `person` has a property named `pet`: `person.pet` is not nullish. `pet` does _not_ have a property called `family`, `person.pet.family` is nullish. The expression returns `undefined`.
38583858
`person.getFullName?.()`: `person` has a property named `getFullName`: `person.getFullName()` is not nullish and can get invoked, which returns `Lydia Hallie`.
3859-
`member.getLastName?.()`: `member` is not defined: `member.getLastName()` is nullish. The expression returns `undefined`.
3859+
`member.getLastName?.()`: variable `member` is non existent therefore a `ReferenceError` gets thrown!
38603860
38613861
</p>
38623862
</details>

0 commit comments

Comments
 (0)