A very common task with strings is to split them into arrays, using a separator character. For example, the following code splits a time string into an array of its basic parts, using the split()
method on the ":"
separator:
var t = "12:10:36";
var tArr = t.split(":");
var hour = tArr[0];
var minute = tArr[1];
var second = tArr[2];