Skip to content

Commit 0970472

Browse files
KadoBOTljharb
authored andcommitted
[guide] fix Array name in examples
1 parent 266860b commit 0970472

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,12 +1323,12 @@ Other Style Guides
13231323
// bad
13241324
const increasedByOne = [];
13251325
for (let i = 0; i < numbers.length; i++) {
1326-
modified.push(numbers[i] + 1);
1326+
increasedByOne.push(numbers[i] + 1);
13271327
}
13281328
13291329
// good
13301330
const increasedByOne = [];
1331-
numbers.forEach(num => modified.push(num + 1));
1331+
numbers.forEach(num => increasedByOne.push(num + 1));
13321332
13331333
// best (keeping it functional)
13341334
const increasedByOne = numbers.map(num => num + 1);

0 commit comments

Comments
 (0)