Why we use filter(), map(),reduce() function?

why we use filter(), map(),reduce() function ?

1 Like

Check out this article. https://medium.freecodecamp.org/an-introduction-to-the-basic-principles-of-functional-programming-a2c2a15c84

The methods mentioned by you are all part of functional programming. You could achive the same thing by running a forloop with some logic in it, but using built it methods is a lot cleaner, intuitive and read like english that tends to introduce less errors. It’s basically a better paradigm of programming than traditional imperative programming.