DEV Community

Discussion on: How to write more clear `for` loops in JavaScript and why it's important?

Collapse
 
surjithctly profile image
Surjith S M

In your filter() example,

let odd = numbers.filter(num => num % 2);

shouldn't be?

let odd = array.filter(num => num % 2);
Collapse
 
koddr profile image
Vic Shóstak

Thanks for issue! Fixed 😉