💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 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); // => '' ```