A simple map function for plain JavaScript arrays

So this isn’t anything new, but sometimes you have to work with plain JavaScript and can’t lean on a library. I thought I’d put this out there. This is my map function. There are many like it, but this one is mine.

Array.prototype.map = function(fn) {
var r = [];
var l = this.length;