EPAM Systems interview question

Write a polyfill of Array.map()