摘要: 1.如何多次复制一个字符串 JS 字符串允许简单的重复,与纯手工复制字符串不同,我们可以使用字符串的repeat方法。 const laughing = '小智'.repeat(3) consol.log(laughing) // "小智小智小智" const eightBits = '1'.rep 阅读全文
posted @ 2021-01-08 17:31 谢创宏 阅读(122) 评论(0) 推荐(0) 编辑