Repeated String es6 code example
Example 1: js multiply string
let myString = 'test';
myString.repeat(3); // 'testtesttest'
Example 2: string repeat javascript
// best implementation
repeatStr = (n, s) => s.repeat(n);
let myString = 'test';
myString.repeat(3); // 'testtesttest'
// best implementation
repeatStr = (n, s) => s.repeat(n);