1 回答
已采纳
![?](http://img1.sycdn.imooc.com/626b8bf50001a3be09700970-100-100.jpg)
__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
提交
取消