Javascript Take()
// Adds "x".take(3) == "xxx"
String.prototype.take = function(num) {
return new Array(num + 1).join(this);
}
// Adds "x".take(3) == "xxx"
String.prototype.take = function(num) {
return new Array(num + 1).join(this);
}