Skip to content

Instantly share code, notes, and snippets.

@dcortesnet
Last active February 14, 2023 12:56
Show Gist options
  • Save dcortesnet/ba0967a0d5501e45b957905628978ec5 to your computer and use it in GitHub Desktop.
Save dcortesnet/ba0967a0d5501e45b957905628978ec5 to your computer and use it in GitHub Desktop.
Javascript estructura de datos array 2D
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