Since we can add an array into an array, we can create multi-dimensional arrays, which have very useful applications (e.g. a matrix):
const matrix = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]
matrix[0][0] //1
matrix[2][0] //7
Hey, make sure you join my 🥾 ⛺ BOOTCAMP waiting list, next cohort in March/April/May 2025
Since we can add an array into an array, we can create multi-dimensional arrays, which have very useful applications (e.g. a matrix):
const matrix = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]
matrix[0][0] //1
matrix[2][0] //7