1const array1 = [1, 4, 9, 16];
2
3// pass a function to map
4const map1 = array1.map(x => x * 2);
5
6console.log(map1);
7// expected output: Array [2, 8, 18, 32]
1let numbers = [33, 22, 44, 55, 66, 77, 88, 99];
2const getNumbers = numbers.map(number => number * 2);
3console.log(getNumbers);
4//Expected output:
5/*[
6 66, 44, 88, 110,
7 132, 154, 176, 198
8 ]
9 */