Skip to content

Instantly share code, notes, and snippets.

@bradpauly
Created March 7, 2013 19:32
Show Gist options
  • Save bradpauly/5111034 to your computer and use it in GitHub Desktop.
Save bradpauly/5111034 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
Number.prototype.times = function(string){
var result = '', times = this;
while(times--) result += string;
return result;
}
console.log(5.times('what'));
</script>
</head>
<body>test.</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment