Posted By

hand4ever on 07/02/10


Tagged

String times


Versions (?)

times in String


 / Published in: JavaScript
 

  1. String.prototype.times = function(num){
  2. return (num <= 0)? "": this.concat(this.times(--num));
  3. };
  4. alert("#".times(3));//show:###

Report this snippet  

You need to login to post a comment.