Is it possible to make a multidimensional array in javascript?
It should look like this:
$cars = array
(
array("Volvo",22,18),
array("BMW",15,13),
array("Saab",5,2),
array("Land Rover",17,15)
);
But I need to use $cars.push()
; to first add all data for the first rows (the cars). Then the data "22", "15", "5" and "17". Then "18", "13", "2" and "15".
Then it should be printed in the same order as the original array (table-view).
EDIT LIKE this:
var cars = [];
cars.push("Volvo", "BMW", "Saab", "Land Rover");
cars.push(22, 15, 5, 17);
cars.push(18, 13, 2, 15);
and print it like this to html
Volvo, 22, 18
BMW, 15 13
Saab, 5, 2
Land Rover, 17, 15