Correct usage of array.join()