JavaScript array.join() Function

JavaScript Logo

array.join() – Joins all elements of an array into a string separated by the specified separator.

๐Ÿ‘‰ Syntax

str = array.join(separator = ',');

๐Ÿงช Example

['a','b','c'].join('-'); // 'a-b-c'

Comments