This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype.joinProperty = function(delim,method) { | |
var output = ''; | |
for(var i=0; i < this.length; i++){ | |
if(this[i].hasOwnProperty(method)){ | |
output = output.concat(this[i][method],delim); | |
}else if(eval("typeof this[i]."+method+" != 'undefined'")){ | |
output = output.concat(eval('this[i].'+method+'()'),delim); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype.joinProperty = function(delim,method) { | |
var output = ''; | |
for(var i=0; i < this.length; i++){ | |
if(this[i].hasOwnProperty(method)){ | |
output = output.concat(this[i][method],delim); | |
}else if(eval("typeof this[i]."+method+" != 'undefined'")){ | |
output = output.concat(eval('this[i].'+method+'()'),delim); | |
} | |
} |