DE
const subtractTwo = (num) => num - 2;
const map = (arr, callback) => {
let output = [];
for (const x of arr) {
output.push(callback(x));
}
return output;
}
console.log(typeof subtractTwo); // should log: 'function'
console.log(typeof map); // should log: 'function'
console.log(map([3,4,5], subtractTwo)); // should log: [ 1, 2, 3 ]