I wish I could find an answer to this question or anything that points me to the right direction. Assume below scenario
let x = [[1,2,3],[2,3,4]]
let y = x[0]
y.push(66)
console.log(x[0])
// [1,2,3,66]
How can I store in the “y” variable the value of x[0], add an element to Y and maintain X to its original roots?
Also why exactly does x[0] gain the new value? I’m no where doing x[0].push(value)