nodejs copy of array code example Example: javascript copy array var numbers = [1,2,3,4,5]; var newNumbers = Object.assign([], numbers);