Skip to content

Instantly share code, notes, and snippets.

@sumanmukherjee03
Created March 7, 2013 19:33
Show Gist options
  • Save sumanmukherjee03/5111041 to your computer and use it in GitHub Desktop.
Save sumanmukherjee03/5111041 to your computer and use it in GitHub Desktop.
times prototype for Number
Number.prototype.times = function(str) {
var result = "", i = this;
while(i-- > 0) {result += str;}
return result;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment