JavaScript Array join()
JavaScript Array join()
The join() method is used to return an array as a string. It will not change the original array. We can use any separator like comma (,), dot (.).
Syntax:-
Its syntax is:- array.join(separator)
Return:-
Its return is:- a string from the array by specified separator.
Further Explanation:-
Parameter | Description |
separator | Optional. The separator to be used. Default is a comma. |