JavaScript Multi Dimensional Array
JavaScript Multi Dimensional Array
JavaScript does not support multi-dimensional arrays as like C, C++, etc.
To have multi-dimensional array in JavaScript, you have to use arrays within an array.
Example
Declaring Multi Dimensional Array
In JavaScript, you have to declare the exact structure of the multi-dimensional array before initializing the value to it.
Note: This example will throw an error because we have initialized the third row without declaring it.
Example
Reminder
Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in JavaScript.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.