const matrix = [
[2, 0, 5, 9],
[0, 4, 0, 3],
[0, 8, 0, 1]
];
// Get the number of rows
const rows = matrix.length;
// Get the number of columns
const columns = matrix[0].length;
const totalCells = rows * columns;
console.log(`Matrix size: ${rows} rows x ${columns} columns`);
console.log(`Total Cells: ${totalCells}`);
/*
run:
Matrix size: 3 rows x 4 columns
Total Cells: 12
*/