1 回答
已采纳
__innocence
TA贡献313条经验 获得超208个赞
function str_repeat(str, num){
return new Array( num + 1 ).join( str );
}
str_repeat("hello",3);//hellohellohello这是把字符串str重复num次的函数实现
添加回答
举报
0/150
提交
取消
