pass a function to map. 4. const map1 = array1.map(x => x * 2);. 5. . 6. console.log(map1);. 7. // expected output: Array [2, 8, 18, 32].
確定! 回上一頁