BloomBoard Interview Question

Implement the javascript array.prototype.map function