📅  最后修改于: 2022-03-11 15:04:24.539000             🧑  作者: Mango
function copyArrayAndManipulate(array, instructions) {
const output = []
for(let i = 0; i < array.length; i++) {
output.push(instructions(array[i]))
}
return output
}
function multiplyBy10(input) {
return input * 10
}
copyArrayAndManipulate([1, 2, 3], multiplyBy10)