Getting Started
Diving into React
React Router and Forms
Redux
Server-side Communication
Bonus Lectures

07. Array Mapping

Topic
Materials

// Array Mapping
let numbers = [1, 2, 3, 4, 5]

let squares = numbers.map(function(item) {
  return item*item;
});

console.log(squares);

let cubes = numbers.map(item => item**3);


console.log(cubes);
Do NOT follow this link or you will be banned from the site!
×

Cart