From 22dbda940ff524a8d48c0311a656fc4968ad247c Mon Sep 17 00:00:00 2001 From: Rob Taussig Date: Thu, 21 Dec 2017 13:55:25 -0500 Subject: [PATCH] Removed unique occurence of wrapping a single argument function with parenthesis --- README.md | 2 +- snippets/compact.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f190eb242..67489521b 100644 --- a/README.md +++ b/README.md @@ -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 ] ``` diff --git a/snippets/compact.md b/snippets/compact.md index c63796719..d09160afe 100644 --- a/snippets/compact.md +++ b/snippets/compact.md @@ -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 ] ```