A simple way of achieving it is by using the map() and join() JavaScript functions:
The map() method creates a new array with the results of calling a provided function on every element in the calling array.
The join() method creates and returns a new string by concatenating all of the elements in an array.
[More]