Sorting javascript array
<p>I have a global array in javascript say
 <code>jsonArr = ["location","department","grade"];</code></p>

<p>now inside my method i am doing this</p>

<pre><code>var newArr = [];
newArr = jsonArr;
var sorted_arr = newArr.sort();
</code></pre>

<p>my newArr is getting sorted but problem is along with jsonArr also got sorted i dont want to sort jsonArr </p>

<p>what is the problem can anyone plz help me ?</p>
