MODULE 2 · Working with data
Reading · 15 min
Arrays
Arrays
An array is an ordered collection. It is useful when the items share a role, such as tasks, products, or scores.
Learning objectives
- Create and read an array
- Use map without mutating the original array
Group ordered values and use array operations intentionally. Focus on explaining each decision in your own words before relying on a pattern or shortcut.
Example
const prices = [10, 20, 30];
const withTax = prices.map((price) => price * 1.18);
console.log(withTax);Summary
KEY TAKEAWAYS
- Arrays preserve item order.
- map creates a new transformed array.
Reading material
Arrays practice prompt
Use the exercise in this lesson to check your understanding.
Your progress is saved on this device. Sign in to keep it across devices.
