I understand that string.split() should produce an array from a
string. However when I use the following script the type of the result
is indeed an object but the array elements are undefined. Why?
var strTest = '1,2,3,4';
var aryTest = strTest.split() ;
alert(typeof aryTest + " " + aryTest[2]);
Thanks in advance.
string. However when I use the following script the type of the result
is indeed an object but the array elements are undefined. Why?
var strTest = '1,2,3,4';
var aryTest = strTest.split() ;
alert(typeof aryTest + " " + aryTest[2]);
Thanks in advance.
Comment