_.join
Lodash only
Joins a list of elements in an array with a given separator.
- // Lodash
- var result = _.join(['one', 'two', 'three'], '--')
- console.log(result)
- // output: 'one--two--three'
- // Native
- var result = ['one', 'two', 'three'].join('--')
- console.log(result)
- // output: 'one--two--three'
Browser Support for Array.prototype.join()
1.0 ✔ | ✔ | 1.0 ✔ | 5.5 ✔ | ✔ | ✔ |
当前内容版权归 you-dont-need 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 you-dont-need .