🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## repeat + [link](./repeat "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L12413 "View in source.") + [npm](https://www.npmjs.com/package/lodash.repeat "See the npm package.") ``` _.repeat([string=''], [n=0]) ``` 重复 N 次字符串 ### 参数 1. [string=''] (string) 要重复的字符串 2. [n=0] (number) 重复的次数 ### 返回值 (string) 返回重复的字符串 ### 示例 ``` _.repeat('*', 3); // => '***' _.repeat('abc', 2); // => 'abcabc' _.repeat('abc', 0); // => '' ```