js repeat line code example Example: string repeat javascript // best implementation repeatStr = (n, s) => s.repeat(n);