Javascript multi-dimensional array value replication question?

js array assignment to another array variable is a reference assignment, which can be passed using circular assignment, concat, and slice. But multi-dimensional array assignment, only cyclic assignment is reliable, slice and concat are not reliable, which god can give a detailed explanation, I am grateful.
var a = [1,2,3];
var b = a;
a.pop();
console.log(b);  //1,2
/*=====================*/
var a = [[1,2],[2]];
var b = a.concat();
a[0][1] = 22;
console.log(b);  //[[1,22],[2]]
//
Object.prototype.clone = function() {
    var o = this.constructor === Array ? [] : {};
    for (var e in this) {
        o[e] = typeof this[e] === "object" ? this[e].clone() : this[e];
    }
    return o;
};
May.22,2021

you need to make a deep copy


can you take a look at your concat and slice related code?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b40e85-ea9f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b40e85-ea9f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?