JavaScript Fundamentals · Arrays · Lesson 17 of 48
Array Methods: push, pop, map
Concept
Array Methods: push, pop, map
push and pop add or remove items from the end of an array. map creates a new array by transforming each item.
Unlike push and pop, map never changes the original array — it always returns a brand new one, which makes it safer to use when other code still relies on the original.
- Explain the core idea behind Array Methods: push, pop, map.
- Predict output before running a change.
- Test one realistic and one unusual input.
- Use the result to make the next decision.
- 1. Read one concept.
- 2. Change the example.
- 3. Run, compare, and explain.
- 4. Complete the challenge below.
Self-check before continuing
Without looking at the example, describe what changes when you modify one input in Array Methods: push, pop, map. Then reopen the editor and prove your explanation with a small test.
You are ready to continue when you can predict, test, and explain the result.
Your turn
Use map to turn an array of names into an array of greeting strings.
Ask about this lesson or your next move. The guide explains the path without taking the work away from you.
Ready for the next lesson?
Mark this lesson complete when you have finished the exercise.
Console