âš ī¸ Warning âš ī¸ Deprecated Code! This video tutorial contains outdated code.
💡 If you wish to update it, any AI assistant will update the code for you in seconds.

Multidimensional Array Programming Tutorial

Published : November 17, 2014   •   Last Edited : November 24, 2025   •   Author : Adam Khoury
Learn to write and process multidimensional arrays using JavaScript. They are called Multidimensional because they contain one or more arrays to provide a deeper level of data nesting and processing than normal basic arrays.
<body>
<script>
var people = [ 
  [ "Joseph",27,"United States",["blue","black"] ],
  [ "Maria",21,"Uraguay",["brown","green"] ], 
  [ "Brian",35,"United Kingdom",["green","red"] ], 
  [ "Susan",42,"Australia",["blue","blonde"] ]
];
// people[2][3][1] = "brown";
// document.write(people[2][3][1]);
for(var i = 0; i < people.length; i++) {
    document.write("<h2>"+people[0]+"</h2>");
    for(var j = 0; j < people.length; j++) {
        document.write(people[j]+"<br>");
    }
}
</script>
</body>