Answers for "javascript array transform"

12

javascript array transform

const array1 = [1, 4, 9, 16];

// pass a function to map
const map1 = array1.map(x => x * 2);

console.log(map1);
// expected output: Array [2, 8, 18, 32]
Posted by: Guest on December-22-2019

Code answers related to "javascript array transform"

Code answers related to "Javascript"

Browse Popular Code Answers by Language