the array.join
function takes an optional delimiter
parameter which will seperate the elements by the delimiter. A simple example:
var showtimes = ["1pm", "2pm", "3pm"];
var showtimesAsString = showtimes.join(', '); // gives "1pm, 2pm, 3pm"
the array.join
function takes an optional delimiter
parameter which will seperate the elements by the delimiter. A simple example:
var showtimes = ["1pm", "2pm", "3pm"];
var showtimesAsString = showtimes.join(', '); // gives "1pm, 2pm, 3pm"