Created
July 24, 2023 16:45
-
-
Save suhailgupta03/d92bfe27e72f077a0680f00fbad4c69e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var list = [ | |
[1, 2, 3, 4], // 0th index | |
[100, 101, 102, 199], // 1st index | |
[201, 202, 203, 299], // 2nd index | |
]; // multi-dimensional array | |
// also called a matrix | |
// above is a 3x4 matrix | |
var array1 = list[0]; | |
console.log(array1); | |
var numberX = array1[1]; | |
console.log(numberX); | |
var arrayY = list[2]; | |
console.log(arrayY); | |
var numberZ = arrayY[3]; // 4th index inside arrayY | |
console.log(numberZ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment