_.concat
Creates a new array concatenating array with any additional arrays and/or values.
- // Underscore/Lodash
- var array = [1]
- var other = _.concat(array, 2, [3], [[4]])
- console.log(other)
- // output: [1, 2, 3, [4]]
- // Native
- var array = [1]
- var other = array.concat(2, [3], [[4]])
- console.log(other)
- // output: [1, 2, 3, [4]]
Browser Support for Array.prototype.concat()
1.0 ✔ | ✔ | 1.0 ✔ | 5.5 ✔ | ✔ | ✔ |
当前内容版权归 you-dont-need 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 you-dont-need .