mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
change wording for 8.2 for consistency
This commit is contained in:
@@ -759,15 +759,15 @@ Other Style Guides
|
||||
> Why not? If you plan on returning an object.
|
||||
|
||||
```javascript
|
||||
// good
|
||||
[1, 2, 3].map(number => `A string containing the ${number}.`);
|
||||
|
||||
// bad
|
||||
[1, 2, 3].map(number => {
|
||||
const nextNumber = number + 1;
|
||||
`A string containing the ${nextNumber}.`;
|
||||
});
|
||||
|
||||
// good
|
||||
[1, 2, 3].map(number => `A string containing the ${number}.`);
|
||||
|
||||
// good
|
||||
[1, 2, 3].map((number) => {
|
||||
const nextNumber = number + 1;
|
||||
|
||||
Reference in New Issue
Block a user