Clone/Copy a Javascript Map Variable
<p>How do I clone/copy a map in Javascript?</p>

<p>I know how to clone an array but how do I clone/copy a map?</p>

<pre><code>var myArray = new Array(1, 2, 3);
var copy    = myArray.slice();
// now I can change myArray[0] = 5; &amp; it wont affect copy array

// Can I just do the same for map?
var myMap = new ?? // in javascript is it called a map?
var myMap = {"1": 1, "2", 2};
var copy  = myMap.slice(); 
</code></pre>
