I would like to create a string, from a letter and length of a string. This is what I currently have, but is there a better way to do this?
function generate(letter, len) {
var str = '';
for (var i=0; i<len; i++) {
str+=letter;
}
return str;
}
String.prototype.repeat), available libraries in the environment, what you mean by "better"