Vincent
Vincent

Reputation: 65

spread syntax Internet explorer

I can't figure out how to port this code properly so that it's compatible with Internet Explorer...

const merged = [].concat(...responses.map(res => res.data));

How do I simply replace the spread syntax?

Upvotes: 2

Views: 413

Answers (1)

Vincent
Vincent

Reputation: 65

const merged = Array.prototype.concat.apply([], responses.map(function (res) {return res.data} ));

Upvotes: 2

Related Questions