Javascript examples for Array Operation:Array Convert
Parse string to array
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w w w . ja va 2s.co m*/ var array_1 = ["string 1",["string 2","string 3"],"string 4"]; var array_2 = [["string 5","string 6","string 7"],"string 8"]; console.log(array_1[1][0]); console.log(array_2[0][2]); } </script> </head> <body> </body> </html>