Splitting a String into an Array

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];

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.185.42