Javascript examples for Array Operation:Array Element
Return values in multiple arrays
<html> <head></head> <body> <script> var products = [//from w w w.j a v a 2 s . c o m ["A", 29.99], ["B", 19.99] ] var testArray = new Array(); for (var i=0; i < products.length; i++){ products[i].splice(0,0,'TEST'); testArray.push(products[i]); } var json = JSON.stringify(testArray); console.log(testArray); </script> </body> </html>