Skip to content
MERN STACK / JAVASCRIPT FOUNDATIONS
12 min
LESSON 29 OF 109

The ERNEST Learning Loop

Transform data with map()

Use map() to create a new array by transforming every item in an existing array.

Your learning journey

0 of 6 stages completed

0%
Currently learning · ExploreMove at your own pace
Explore · real-world problem

Before we learn the syntax, let's meet the problem.

An online store has 4 products priced at ₹100, ₹200, ₹300 and ₹400. The store is running a 10% discount. The team needs a discounted price for every product while keeping the original catalogue prices unchanged.

Which approach would you choose if the store had 10,000 products?

Explore · 1/6