Skip to content

Commit

Permalink
Merge pull request #445 from skarlinski/patch-1
Browse files Browse the repository at this point in the history
Changed `const` to `let` in es6 Array.map example
  • Loading branch information
bebraw committed Feb 26, 2018
2 parents a44c260 + 8188e72 commit 3ba599e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manuscript/appendices/01_language_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ In ES6 we could write it as follows:

```javascript
function map(cb, values) {
const ret = [];
const i, len;
let ret = [];
let i, len;

for(i = 0, len = values.length; i < len; i++) {
ret.push(cb(values[i]));
Expand Down

0 comments on commit 3ba599e

Please sign in to comment.