JSFiddle - React, Tailwind, and code Playground

by Himanshu Joshi

JavaScript

String.prototype.repeatify = function(num){
var str ='';
	for(var i=0; i<num; i++){
  		str+= this;
  }
  
  return str;
}

console.log('hello'.repeatify(3));