assign an array to another array in typescript code example Example: js copy array into another var destinationArray = Array.from(sourceArray);