TS Repetir cadena
export const repeatStr = (n: number, s: String): String => s["repeat"](n);
Puzzled Puffin
export const repeatStr = (n: number, s: String): String => s["repeat"](n);
export const repeatStr = (n: number, s: string) => Array(n + 1).join(s);
export function repeatStr(n: number, s: string): string {
return s.repeat(n);
}
export function repeatStr(n: number, s: string): string {
return ''.padStart(n * s.length, s);
}