I want to copy the values from matrixA into matrixB and then add a new element to each array in matrixB.
let number = 100;
matrixA = [
[1, 2],
[3, 4]
];
matrixB = [
[1, 2, 100],
[3, 4, 100]
];
Currently, my code looks like this:
for (let n in matrixB){
matrixB[n] = matrixA.slice();
}
However, I am encountering difficulties in adding the "number = 100"