Skip to content

Commit 2fea2b6

Browse files
committed
Fix typos
1 parent 64280c1 commit 2fea2b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
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 thorw 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 `undefinfed`, 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>
@@ -452,7 +452,7 @@ sum(1, "2");
452452

453453
#### Answer: C
454454

455-
JavScript is a **dynamimcally typed language**: we don't specify what types certain variables are. Values can automatically be converted into another type without you knowing, whihc is called _implicit type coercion_. **Coercion** is converting from one type into another.
455+
JavScript is a **dynamimcally typed language**: we don't specify what types certain variables are. Values can automatically be converted into another type without you knowing, which is called _implicit type coercion_. **Coercion** is converting from one type into another.
456456

457457
In this example, JavaScript converts the number `1` into a string, in order for the function to make sense and return a value. During the addition of a numeric type (`1`) and a string type (`'2'`), the number is treated as a string. We can concatenate strings like `"Hello" + "World"`, so what's happening here is `"1" + "2"` which returns `"12"`.
458458

0 commit comments

Comments
 (0)