Last active
February 14, 2023 12:56
-
-
Save dcortesnet/ba0967a0d5501e45b957905628978ec5 to your computer and use it in GitHub Desktop.
Javascript estructura de datos array 2D
This file contains 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
const array2D = [ | |
[1, 2, 3], | |
[4, 5, 6], | |
[7, 8, 9], | |
]; | |
for (let cols = 0; cols < array2D.length; cols++) { | |
for (let rows = 0; rows < array2D[cols].length; rows++) { | |
const element = array2D[cols][rows]; | |
console.log(element); | |
} | |
} | |
console.table(array2D); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment