面试题答案
一键面试function repeatString(str: string, times: number = 10): string {
let result = '';
for (let i = 0; i < times; i++) {
result += str;
}
return result;
}
function repeatString(str: string, times: number = 10): string {
let result = '';
for (let i = 0; i < times; i++) {
result += str;
}
return result;
}