Last active
February 16, 2020 07:25
-
-
Save bstonedev/5e204f75426ed6509e635004c9ac3dc6 to your computer and use it in GitHub Desktop.
Nested Arrays in JavaScript / Multi Level Array / Multidimensional Array
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
// this is to create a Nested Array | |
// eg. multiLevelArray[0][0] | |
var multiLevelArray = new Array(loop.length); | |
for (var k = 0; k < loop.length; k++) { | |
multiLevelArray[k] = new Array(loop[k].valueA, loop[k].valueB); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment