angular clone array without reference

JavaScript
const myClonedArray  = Object.assign([], myArray);const myClonedObject = Object.assign({}, myObject);
Source

Also in JavaScript: