Takes an input list and returns a list of equal elements created from a transformation of the original list.
Boilerplate
const array = [1, 4, 9, 16];
// Pass a function to map
const mapped = array.map((x) => x * 2);
Takes an input list and returns a list of equal elements created from a transformation of the original list.
const array = [1, 4, 9, 16];
// Pass a function to map
const mapped = array.map((x) => x * 2);