Given an array containing array elements and here we will join all the array elements to make a single string. To join the array elements we use arr.join() method. This method is used to join the elements of an array into a string. The elements of the string will be separated by a specified separator and its default value is a comma(,).
In this case, we use empty separator i.e. array.join(“”) to joint the array elements.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.