Skip to content

Commit d5ecffe

Browse files
Merge pull request ryanmcdermott#188 from maksugr/typo-fix-1
Fixes some typo issues
2 parents b82b63b + a59d78b commit d5ecffe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ Since JavaScript allows you to make objects on the fly, without a lot of class
216216
boilerplate, you can use an object if you are finding yourself needing a
217217
lot of arguments.
218218

219-
To make it obvious what properties the function expects, you can use the es6
219+
To make it obvious what properties the function expects, you can use the ES2015/ES6
220220
destructuring syntax. This has a few advantages:
221221

222222
1. When someone looks at the function signature, it's immediately clear what
@@ -578,7 +578,7 @@ console.log(newName); // ['Ryan', 'McDermott'];
578578

579579
### Avoid Side Effects (part 2)
580580
In JavaScript, primitives are passed by value and objects/arrays are passed by
581-
reference. In the case of objects and arrays, if our function makes a change
581+
reference. In the case of objects and arrays, if your function makes a change
582582
in a shopping cart array, for example, by adding an item to purchase,
583583
then any other function that uses that `cart` array will be affected by this
584584
addition. That may be great, however it can be bad too. Let's imagine a bad
@@ -1456,7 +1456,7 @@ inventoryTracker.requestItems();
14561456
### Prefer ES2015/ES6 classes over ES5 plain functions
14571457
It's very difficult to get readable class inheritance, construction, and method
14581458
definitions for classical ES5 classes. If you need inheritance (and be aware
1459-
that you might not), then prefer classes. However, prefer small functions over
1459+
that you might not), then prefer ES2015/ES6 classes. However, prefer small functions over
14601460
classes until you find yourself needing larger and more complex objects.
14611461

14621462
**Bad:**

0 commit comments

Comments
 (0)