@stdlib/array
Version:
Arrays.
36 lines (25 loc) • 731 B
Plain Text
{{alias}}( x, separator )
Return a string created by joining array elements using a specified
separator.
If provided an array-like object having a `join` method, the function defers
execution to that method and assumes that the method has the following
signature:
x.join( separator )
If provided an array-like object without a `join` method, the function
manually constructs the output string.
Parameters
----------
x: ArrayLikeObject
Input array.
separator: string
Separator.
Returns
-------
out: string
Output string.
Examples
--------
> var out = {{alias}}( [ 1, 2, 3, 4 ], ',' )
'1,2,3,4'
See Also
--------