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 266860b commit 0970472Copy full SHA for 0970472
README.md
@@ -1323,12 +1323,12 @@ Other Style Guides
1323
// bad
1324
const increasedByOne = [];
1325
for (let i = 0; i < numbers.length; i++) {
1326
- modified.push(numbers[i] + 1);
+ increasedByOne.push(numbers[i] + 1);
1327
}
1328
1329
// good
1330
1331
- numbers.forEach(num => modified.push(num + 1));
+ numbers.forEach(num => increasedByOne.push(num + 1));
1332
1333
// best (keeping it functional)
1334
const increasedByOne = numbers.map(num => num + 1);
0 commit comments