We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4718d4 commit fae5111Copy full SHA for fae5111
README.md
@@ -562,22 +562,22 @@ be very expensive in terms of performance.
562
563
**Bad:**
564
```javascript
565
-const addItemToCart = function (cart, item) {
566
- cart.push({ item: item, date: Date.now() });
+const addItemToCart = (cart, item) => {
+ cart.push({ item, date: Date.now() });
567
568
return cart;
569
-}
+};
570
```
571
572
**Good:**
573
574
575
const c = Object.assign({}, cart);
576
577
- c.push({ item: item, date: Date.now() });
+ c.push({ item, date: Date.now() });
578
579
return c;
580
581
582
583
**[⬆ back to top](#table-of-contents)**
0 commit comments