From 5b8b56ece733543787c07d60c5f93efc5bbb2b6f Mon Sep 17 00:00:00 2001 From: Tomek Wiszniewski Date: Wed, 12 Aug 2015 11:09:14 +0200 Subject: [PATCH] Upgrade a note about parens to another rule --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 9b362d97..fb9020ca 100644 --- a/README.md +++ b/README.md @@ -631,6 +631,18 @@ }); ``` + - [8.3](#8.3) If your function only takes a single argument, feel free to omit the parentheses. + + > Why? Less visual clutter. + + ```js + // good + [1, 2, 3].map(x => x * x); + + // good + [1, 2, 3].reduce((y, x) => x + y); + ``` + **[⬆ back to top](#table-of-contents)**