mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 13:08:06 -05:00
[Docs] update 8.3 to fix conflict with 6.2 (fixes #1058)
This commit is contained in:
committed by
Jordan Harband
parent
e59376f625
commit
7da28d43ad
15
README.md
15
README.md
@@ -849,15 +849,18 @@ Other Style Guides
|
||||
|
||||
```js
|
||||
// bad
|
||||
[1, 2, 3].map(number => 'As time went by, the string containing the ' +
|
||||
`${number} became much longer. So we needed to break it over multiple ` +
|
||||
'lines.'
|
||||
['get', 'post', 'put'].map(number => Object.prototype.hasOwnProperty.call(
|
||||
httpMagicObjectWithAVeryLongName,
|
||||
httpMethod
|
||||
)
|
||||
);
|
||||
|
||||
// good
|
||||
[1, 2, 3].map(number => (
|
||||
`As time went by, the string containing the ${number} became much ` +
|
||||
'longer. So we needed to break it over multiple lines.'
|
||||
['get', 'post', 'put'].map(number => (
|
||||
Object.prototype.hasOwnProperty.call(
|
||||
httpMagicObjectWithAVeryLongName,
|
||||
httpMethod
|
||||
)
|
||||
));
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user