typescript copy element of an array to another code example Example: copy array typescript let myClonedArray: Array<Type> = [...myArray];