标签: internet-explorer ecmascript-5 transpiler spread-syntax
我不知道如何正确移植此代码,以使其与Internet Explorer兼容...
const merged = [].concat(...responses.map(res => res.data));
如何简单地替换传播语法?
答案 0 :(得分:0)
const merged = Array.prototype.concat.apply([],response.map(function(res){return res.data}));