Date

“Array” Methods

_.join(array, [separator=','])

source npm package

Converts all elements in array into a string separated by separator.

引入版本

4.0.0

参数
array (Array) : The array to convert.
[separator=','] (string) : The element separator.

返回值
(string) : Returns the joined string.

示例
_.join(['a', 'b', 'c'], '~');
// => 'a~b~c'