print a string n times javascript code example
Example 1: js multiply string
let myString = 'test';
myString.repeat(3); // 'testtesttest'
Example 2: repeat js
repeatStr = (n, s) => s.repeat(n);
let myString = 'test';
myString.repeat(3); // 'testtesttest'
repeatStr = (n, s) => s.repeat(n);