FrontendChallenges is a collection of frontend interview questions and answers. It is designed to help you prepare for frontend interviews. It's free and open source.
export function arrayMap(array, callback) {
const result = [];
for (let i = 0; i < array.length; i++) {
const current = array[i];
result.push(callback(current, i, array))
}
return result;
}
index.js