copy all the element of an array to other array javasript code example Example: js copy array into another var destinationArray = Array.from(sourceArray);