@@ -216,7 +216,7 @@ Since JavaScript allows you to make objects on the fly, without a lot of class
216216boilerplate, you can use an object if you are finding yourself needing a
217217lot 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
220220destructuring syntax. This has a few advantages:
221221
2222221 . 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)
580580In 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
582582in a shopping cart array, for example, by adding an item to purchase,
583583then any other function that uses that ` cart ` array will be affected by this
584584addition. 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
14571457It's very difficult to get readable class inheritance, construction, and method
14581458definitions 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
14601460classes until you find yourself needing larger and more complex objects.
14611461
14621462** Bad:**
@@ -2158,5 +2158,6 @@ This is also available in other languages:
21582158 - ![ ru] ( https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Russia.png ) ** Russian** :
21592159 - [ BoryaMogila/clean-code-javascript-ru/] ( https://github.com/BoryaMogila/clean-code-javascript-ru/ )
21602160 - [ maksugr/clean-code-javascript] ( https://github.com/maksugr/clean-code-javascript )
2161+ - ![ vi] ( https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Vietnam.png ) ** Vietnamese** : [ hienvd/clean-code-javascript/] ( https://github.com/hienvd/clean-code-javascript/ )
21612162
21622163** [ ⬆ back to top] ( #table-of-contents ) **
0 commit comments