Skip to content

Instantly share code, notes, and snippets.

View ruanmer's full-sized avatar
🤔

Ruan Mer ruanmer

🤔
View GitHub Profile
@ruanmer
ruanmer / gist:5221678
Last active December 15, 2015 07:09
joinForEach
Array.prototype.joinForEach = function(separator, fn, scope){
var array = new Array();
for (var i = 0, len = this.length; i < len; ++i) {
fn.call(scope, array, this[i], i, this);
}
return array.join(separator);
};