Javascript How to create a copy of an array such that changes to the old array will not be reflected in the new array? // affected by using splice, pop, unshift, push... var newArray = oldArray.splice(0); Function prototype?