js multiply string

JavaScript
let string = 'Plumbus'
let count = 3

string.repeat(count); // -> 'PlumbusPlumbusPlumbus'var a="a";
var aaa=a.repeat(3); // "aaa"
function repeatStringNumTimes(string, times) {
  var repeatedString = "";
  while (times > 0) {
    repeatedString += string;
    times--;
  }
  return repeatedString;
}
repeatStringNumTimes("abc", 3);let myString = 'test';

myString.repeat(3);		// 'testtesttest'
Source

Also in JavaScript: