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 32ec9dd commit b54ce43Copy full SHA for b54ce43
README.md
@@ -743,7 +743,7 @@ Other Style Guides
743
```
744
745
746
- - [8.4](#8.4) <a name='8.4'></a> If your function takes a single argument and consists of a single expression, omit the parentheses.
+ - [8.4](#8.4) <a name='8.4'></a> If your function takes a single argument and doesn’t use braces, omit the parentheses.
747
748
> Why? Less visual clutter.
749
@@ -756,6 +756,12 @@ Other Style Guides
756
// good
757
[1, 2, 3].map(x => x * x);
758
759
+ // good
760
+ [1, 2, 3].map(number => (
761
+ `A long string with the ${number}. It’s so long that we’ve broken it ` +
762
+ 'over multiple lines!'
763
+ ));
764
+
765
// bad
766
[1, 2, 3].reduce(x => {
767
const y = x + 1;
0 commit comments