.join([separator]) Adds all the elements of an array separated by the specified separator string. const a = [0, 1, 2, 3, 4]; const b = a.join("-"); // "0-1-2-3-4" The default is a comma (",").