Skip to content

Commit e1ccbb5

Browse files
committed
Fix minor typos
1 parent 0abbfc5 commit e1ccbb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ JavaScript interprets (or unboxes) statements. When we use bracket notation, it
160160

161161
`mouse[bird.size]`: First it evaluates `bird.size`, which is `"small"`. `mouse["small"]` returns `true`
162162

163-
However, with dot notation, this doesn't happen. `mouse` does not have a key called `bird`, which means that `mouse.bird` is `undefined`. Then, we ask for the `size` using dot notation: `mouse.bird.size`. Since `mouse.bird` is `undefinfed`, we're actually asking `undefined.size`. This isn't valid, and will throw an error similar to `Cannot read property "size" of undefined`.
163+
However, with dot notation, this doesn't happen. `mouse` does not have a key called `bird`, which means that `mouse.bird` is `undefined`. Then, we ask for the `size` using dot notation: `mouse.bird.size`. Since `mouse.bird` is `undefined`, we're actually asking `undefined.size`. This isn't valid, and will throw an error similar to `Cannot read property "size" of undefined`.
164164

165165
</p>
166166
</details>
@@ -349,7 +349,7 @@ console.log(member.getFullName());
349349

350350
#### Answer: A
351351

352-
You can't add properties to a constructor like you can with regular objects. If you want to add a feature to all object at once, you have to use the prototype instead. So in this case,
352+
You can't add properties to a constructor like you can with regular objects. If you want to add a feature to all objects at once, you have to use the prototype instead. So in this case,
353353

354354
`Person.prototype.getFullName = () => this.firstName + this.lastName`
355355

0 commit comments

Comments
 (0)