javacript repeat code example
Example 1: js string times
let string = 'Plumbus'
let count = 3
string.repeat(count); // -> 'PlumbusPlumbusPlumbus'
Example 2: js repeat
function repeatStr (n, s) {
return s.repeat(n)
}
/////////////////////////////similar///////////////////////////////////////////
repeatStr = (n, s) => s.repeat(n);