title: Map.set() polyfill for old IE?
body: <p>Is there a <code>Map.set()</code> polyfill for &lt;=IE11? I have found this, but i have no idea how it works. It's a little bit large: <a href="https://github.com/Riim/map-set-polyfill/blob/master/index.js" rel="nofollow noreferrer">https://github.com/Riim/map-set-polyfill/blob/master/index.js</a></p>
  
  <p>PS: </p>
  
  <blockquote>
    <p>Creating the new tag 'javascript-map' requires at least 1500
    reputation. Try something from the existing tags list instead.</p>
  </blockquote>
  
  <p>There remains only <code>javascript</code> left.</p>
  
  <p>The full problem:<br>
  <code>Object.keys()</code> return a sorted array. That's not good in my case. <code>Map.keys()</code> return a unsorted array in filled order.</p>
  
  <pre><code>var map1 = new Map();
  map1.set("123", "c");
  map1.set(123, "b");
  var iterator1 = map1.keys();
  var myarray = [];
  for (var i = 0; i &lt; map1.size; i++) {
    myarray.push(iterator1.next().value);
  }
  console.log(myarray);
  // Array ["123", 123]
  </code></pre>
  
  <p>But not all <code>Map.functions()</code> are available in IE. First <code>Map.keys()</code>. For this a polyfill for IE is available.  <code>Map.forEach()</code> is available from IE11, that's enougth.</p>
  
  <pre><code>var map1 = new Map();
  map1.set(".", "z");
  map1.set("2", "y");
  map1.set(1, "x");
  var mapkeys = [];
  function getmyMapkeys(value, key, map) {
    mapkeys.push(key);
  }
  map1.forEach(getmyMapkeys);
  console.log(mapkeys);
  // Array [".", "2", 1]
  </code></pre>
  
  <p>The second is <code>Map.set()</code>, and for this i search a polyfill.</p>
  
  <p><strong>Conclusion:</strong> <code>new Map(iterator)</code> is not available in IE11. <code>Map.set()</code> is available from IE11 (11.0.9600.17843) (Win7 SP1). Another way to create a map and fill it with content does not exist.</p>