assign array of objects to another array javascript code example Example: js copy array into another var destinationArray = Array.from(sourceArray);