Removed unique occurence of wrapping a single argument function with parenthesis

This commit is contained in:
Rob Taussig
2017-12-21 13:55:25 -05:00
parent ecaf146aee
commit 22dbda940f
2 changed files with 2 additions and 2 deletions

View File

@ -243,7 +243,7 @@ Removes falsey values from an array.
Use `Array.filter()` to filter out falsey values (`false`, `null`, `0`, `""`, `undefined`, and `NaN`).
```js
const compact = (arr) => arr.filter(Boolean);
const compact = arr => arr.filter(Boolean);
// compact([0, 1, false, 2, '', 3, 'a', 'e'*23, NaN, 's', 34]) -> [ 1, 2, 3, 'a', 's', 34 ]
```

View File

@ -5,6 +5,6 @@ Removes falsey values from an array.
Use `Array.filter()` to filter out falsey values (`false`, `null`, `0`, `""`, `undefined`, and `NaN`).
```js
const compact = (arr) => arr.filter(Boolean);
const compact = arr => arr.filter(Boolean);
// compact([0, 1, false, 2, '', 3, 'a', 'e'*23, NaN, 's', 34]) -> [ 1, 2, 3, 'a', 's', 34 ]
```