Skip to content

Commit f392bfb

Browse files
authored
Merge pull request lydiahallie#526 from piotrwawrzyn/patch1
Little fix to the answer explanation of question 119
2 parents 51ef698 + 57bca21 commit f392bfb

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
@@ -3860,7 +3860,7 @@ With the optional chaining operator `?.`, we no longer have to explicitly check
38603860
`person.pet?.name`: `person` has a property named `pet`: `person.pet` is not nullish. It has a property called `name`, and returns `Mara`.
38613861
`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`.
38623862
`person.getFullName?.()`: `person` has a property named `getFullName`: `person.getFullName()` is not nullish and can get invoked, which returns `Lydia Hallie`.
3863-
`member.getLastName?.()`: `member` is not defined: `member.getLastName()` is nullish. The expression returns `undefined`.
3863+
`member.getLastName?.()`: variable `member` is non existent therefore a `ReferenceError` gets thrown!
38643864
38653865
</p>
38663866
</details>

0 commit comments

Comments
 (0)