/ Published in: JavaScript
Expand |
Embed | Plain Text
String.prototype.repeat = function( num ) { for( var i = 0, buf = ""; i < num; i++ ) buf += this; return buf; } //faster than //new Array( num + 1 ).join( this );
You need to login to post a comment.
