Skip to content

Commit caa7d90

Browse files
author
Sean Arseneault
committed
Fixed typos
1 parent 1316c35 commit caa7d90

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ebook/02_arrow_functions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ console.log(results);
7878
// {name: "Asafa Powell", race: "100m dash", place: 3}]
7979
```
8080

81-
To tell JavaScript that what's inside the curly braces is an **object literal** that we want to implicitly return, we need to wrap everything inside parenthesis.
81+
To tell JavaScript what's inside the curly braces is an **object literal** we want to implicitly return, we need to wrap everything inside parenthesis.
8282

8383
Writing `race` or `race: race` is the same.
8484

@@ -121,7 +121,7 @@ box.addEventListener("click", function() {
121121
```
122122

123123

124-
The problem in this case is that the first `this` is bound to the `const` box but the second one, inside the `setTimeout`, will be set to the `Window` object, trowing this error:
124+
The problem in this case is that the first `this` is bound to the `const` box but the second one, inside the `setTimeout`, will be set to the `Window` object, throwing this error:
125125

126126
``` javascript
127127
Uncaught TypeError: cannot read property "toggle" of undefined
@@ -187,7 +187,7 @@ example(1,2,3);
187187

188188
As you can see we accessed the first argument using an array notation `arguments[0]`.
189189

190-
Similarly as what we saw with the `this` keyword, Arrow functions inherit the value of the `arguments object` from their parent scope.
190+
Similarly to what we saw with the `this` keyword, Arrow functions inherit the value of the `arguments object` from their parent scope.
191191

192192
Let's have a look at this example with our previous list of runners:
193193

0 commit comments

Comments
 (0)