DEV Community


Discussion on: Functional Programming in JavaScript

hunter profile image
Hunter Henrichsen Author • Edited

We could, but for someone who is not familiar with functional programming it's a little strange. We could also do this:

const anyMatch = (list, predicate) => list.some(predicate);

The point is to illustrate how this would work without applying functional programming to everything in order to build some understanding using familiar constructs.