assign array to another array angular element by element code example Example: js copy array into another var destinationArray = Array.from(sourceArray);