Created
March 7, 2013 19:33
-
-
Save sumanmukherjee03/5111041 to your computer and use it in GitHub Desktop.
times prototype for Number
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
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