diff --git a/README.md b/README.md index f8a58b56..429a444b 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,7 @@ Since JavaScript allows you to make objects on the fly, without a lot of class boilerplate, you can use an object if you are finding yourself needing a lot of arguments. -To make it obvious what properties the function expects, you can use the es6 +To make it obvious what properties the function expects, you can use the ES2015/ES6 destructuring syntax. This has a few advantages: 1. When someone looks at the function signature, it's immediately clear what @@ -578,7 +578,7 @@ console.log(newName); // ['Ryan', 'McDermott']; ### Avoid Side Effects (part 2) In JavaScript, primitives are passed by value and objects/arrays are passed by -reference. In the case of objects and arrays, if our function makes a change +reference. In the case of objects and arrays, if your function makes a change in a shopping cart array, for example, by adding an item to purchase, then any other function that uses that `cart` array will be affected by this addition. That may be great, however it can be bad too. Let's imagine a bad @@ -1456,7 +1456,7 @@ inventoryTracker.requestItems(); ### Prefer ES2015/ES6 classes over ES5 plain functions It's very difficult to get readable class inheritance, construction, and method definitions for classical ES5 classes. If you need inheritance (and be aware -that you might not), then prefer classes. However, prefer small functions over +that you might not), then prefer ES2015/ES6 classes. However, prefer small functions over classes until you find yourself needing larger and more complex objects. **Bad:**