Here you can find the source of repeatify(timesToRepeat)
String.prototype.repeatify = function(timesToRepeat) { var string = this; for (var i = 1; i < timesToRepeat; i++) { string += this;/* w w w .j a v a 2 s.co m*/ } return string; };
String.prototype.repeatify = String.prototype.repeatify || function(times) { var str = ''; for (var i = 0; i < times; i++) { str += this; return str; }; console.log('hello'.repeatify(3));
'use strict'; String.prototype.repeatify = String.prototype.repeatify || function(times) { var str = ''; for (var i = 0; i < times; i++) { str += this; return str; }; console.log('hello'.repeatify(3)); ...
String.prototype.repeatify = String.prototype.repeatify || function(times) { var string = ''; for (var i = 0; i < times; i++) { string += this; return string; console.log('Hello'.repeatify(5));
String.prototype.repeatify = String.prototype.repeatify || function(times){ var str = ''; for(var i=0; i<times; i++){ str +=this; return str; }; console.log('hello'.repeatify(3));
String.prototype.repeatify = String.prototype.repeatify || function(times) { var str = ''; for (var i = 0; i < times; i++) { str += this; return str; };
String.prototype.repeatify = String.prototype.repeatify || function (times) { var str = ''; for (var i = times; i--;) { console.log(i); str += this; return str; }; console.log('1 '.repeatify(6)) ...
String.prototype.repeatify = String.prototype.repeatify || function(num){ "use strict"; let newString = ""; while(num >0){ newString +=this; num--; return newString; }; ...
String.prototype.repeatify = String.prototype.repeatify || function(number) { let string = '' for(let i = 0; i < number; i++) { string += this return string console.log('hello'.repeatify(3));
String.prototype.repeatify = String.prototype.repeatify || function(times) { var str = ''; for (var i = 0; i < times; i++) { str += this; return str; }; console.log('hello'.repeatify(3));