mirror of
https://github.com/rjNemo/functional-programming-jargon
synced 2026-06-06 10:36:45 +00:00
Merge pull request #52 from neighborhood999/patch-1
use `let` instead of `var` in for loop.
This commit is contained in:
commit
9397e16816
1 changed files with 1 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ A function which takes a function as an argument and/or returns a function.
|
|||
```js
|
||||
const filter = (pred, xs) => {
|
||||
const result = [];
|
||||
for (var idx = 0; idx < xs.length; idx++) {
|
||||
for (let idx = 0; idx < xs.length; idx++) {
|
||||
if (pred(xs[idx])) {
|
||||
result.push(xs[idx]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue