告诉我们发生了什么:
在此详细描述你的问题。
你目前的代码
// function repeatStringNumTimes(str, num) {
// return Array.from({length:num},() => str).join("");
// }
// console.log(repeatStringNumTimes("w", 6))
function repeatStringNumTimes(str, num) {
return Array.from({length:num},() => str).join("");
}
console.log(repeatStringNumTimes("w", 6))
你的浏览器信息:
用户代理是: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
挑战: 基础算法 - 重复输出字符串
挑战的链接: