Learn 2D ARRAYS in JavaScript in 6 minutes! ⬜
Bro Code
•
November 6, 2023
Bro Code
@brocodezAbout
Coding bootcamps HATE HIM! 🗿
Latest Posts
Video Description
// 2D array = multi-dimensional array that stores a matrix // of data in rows and columns. // Useful for games, spreadsheets, or representing images const matrix = [ [1, 2, 3], [4, 5, 6], [7, 8, 9]]; //matrix[0][0] = 'X'; //matrix[0][1] = 'O'; //matrix[0][2] = 'X'; //matrix[1][0] = 'O'; //matrix[1][1] = 'X'; //matrix[1][2] = 'O'; //matrix[2][0] = 'X'; //matrix[2][1] = 'O'; //matrix[2][2] = 'X'; for(let row of matrix){ const rowString = row.join(' '); console.log(rowString); }
You May Also Like
JavaScript Learning Essentials
AI-recommended products based on this video
Loading...

Pishengfa DIY Stitch Book, Embroidery Stitch Book, DIY Sewing Books, EmbroideryS Books of Stitches, with 86/128 Sewing Tips for Beginners, Unique Embroidery Handmade Gifts (Grey)
(0)
$29.99
$6.99 delivery Dec 23, 2025 - Jan 2, 2026
700+ bought in past month
Loading...

Sunrad Sewing Kit for Kids Beginner Arts and Crafts, Make 9 Easy DIY Projects, Unicorn & Animal Felt Craft Educational Toys Learn to Sew, Birthday Gifts for Girls Kids Age 6-8-10-12+
(170)
$19.99
FREE delivery Sat, Jun 14 on your first order
200+ bought in past month



















