Manu
Manu

Reputation: 652

Error with Array.map() in IE11

I have this code:

var labelsPrint= new Array();

var vector = labelsPrint.map((el) => el.id);

IE11 give me a error, because lost the datas. Do you know an other way for make this .map?

Upvotes: 12

Views: 14997

Answers (1)

Nina Scholz
Nina Scholz

Reputation: 386610

IE11 has ES5, not ES6

var vector = labelsPrint.map(function (el) { return el.id; });

Upvotes: 32

Related Questions