I discovered that the assignment function does not work when the initial matrices contain null elements. Two examples below clearly show this:
var x = ["title","t1"];
var y = []; Y[3]= "t3";
console.log (x);
console.log (y);
Object.assign (x, y);
console.log (x);
console.log (y);
var x = ["title","t1"];
var y = [null,null,null,"t3"];
console.log (x);
console.log (y);
Object.assign (x, y);
console.log (x);
console.log (y);
Is it possible to make the Object.assign function work with arrays that contain null elements like these?
var y = [null,null,null,"t3"];