how to repeat a function java script code example Example: repeat js repeatStr = (n, s) => s.repeat(n);