mathiasbynens / Array.from

A robust & optimized ES3-compatible polyfill for the `Array.from` method in ECMAScript 6.

Home Page:https://mths.be/array-from

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Array.from(MapIterator) problem

LinboLen opened this issue · comments

can you make this code work well, array.from works well in my new version chrome, but lower version browser can't support array.from, the shim should support it

var m = new Map();

m.set('strKey1',"strValue1");
m.set('strKey2',"strValue2");
m.set(function(){},"funcValue1");
m.set(function(){console.log("funcKey2")}, function(){console.log("funcValue2")});

console.log("The result is: ", Array.from(m.keys()));
console.log("The result is: ", Array.from(m.values())); 

I have commented in #4

Duplicate of #4.