Skip to content

Instantly share code, notes, and snippets.

@EddieDev
Forked from lennym/jcci.js
Created November 24, 2011 21:00
Show Gist options
  • Select an option

  • Save EddieDev/1392273 to your computer and use it in GitHub Desktop.

Select an option

Save EddieDev/1392273 to your computer and use it in GitHub Desktop.
Javascript Code Challenge Result. http://eblundell.com/javascript-challenge
Array.prototype.joinProperty = function(method, delim) {
var output = [];
for(var i=0; i < this.length; i++){
if(typeof this[i][method] == 'function'){
output.push(this[i][method]());
} else {
output.push(this[i][method]);
}
}
return output.join(delim);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment