A very useful feature of Array
objects is the ability to combine the elements of a string together to make a String
object, separated by a specific separator using the join()
method. For example, the following code joins the time components back together into the format 12:10:36
:
var timeArr = [12,10,36];
var timeStr = timeArr.join(":");