Reputation: 65
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
Reputation: 65
const merged = Array.prototype.concat.apply([], responses.map(function (res) {return res.data} ));
Upvotes: 2