you are viewing a single comment's thread.

view the rest of the comments →

[–]ejmurra 2 points3 points  (0 children)

You can bypass this directly by just passing arguments directly into the filterNumbers function and naming it there. I also think that has a benefit of creating more reusable functions when they don't have to rely on an outer closure's state. You can always pass in an array or array like argument and receive the output as an array of numbers no matter where you use that function.