DEV Community

Cover image for Javascript useful array functions: map, filter, find and reduce
Hugo Sandoval
Hugo Sandoval

Posted on

1

Javascript useful array functions: map, filter, find and reduce

Hello everyone, I made a small recap of these super useful array functions in JavaScript: map, filter, find, reduce.

Let’s start defining our array.

Defining our array of objects

For example, we gonna use some fruits and their price and quantity.

const fruits = [
    {
        name: "Apple",
        units: 3,
        price: 0.25
    },
    {
        name: "Mango",
        units: 6,
        price: 0.35
    },
    {
        name: "Banana",
        units: 4,
        price: 0.15
    },
];
Enter fullscreen mode Exit fullscreen mode

Now I have a developer blog, continue reading this post here: https://hhsm95.dev/blog/javascript-useful-array-functions-map-filter-find-and-reduce/

Thank you!

Top comments (0)

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay