Passing a JS Array to a new Array
<p>sorry very basic question I'm new.</p>

<p>If I have an array and pass it to a new variable (newArray = oldArray) then remove an element from newArray, it seems to also effect oldArray.</p>

<p>my guess is that it's simply creating a new reference to the same variable, so that data that was stored in oldArray now has two identifiers?</p>

<p>If so how do I actually pass the elements from oldArray into newArray so that newArray is independent from oldArray?</p>

<p>Thanks in advance</p>
