小编Vla*_*ets的帖子

microsoft edge 中的对象传播运算符抛出错误

我有代码:

let a = {a: 'a', b: 'b'};
let b = {c: 'c', d: 'd'};
let c = {...a, ...b};
Run Code Online (Sandbox Code Playgroud)

在chrome / firefox /... 中它的 display: c = {a: 'a', b: 'b', c: 'c', d: 'd'},但在microsoft edge 中它抛出 error Expected identifier, string or number。

我尝试使用cdn.polyfill.io,https://babeljs.io/docs/en/babel-polyfill但没有运气。

我可以做些什么来在microsoft edge 中运行我的webpack代码?

javascript object spread-syntax microsoft-edge

2
推荐指数
1
解决办法
2101
查看次数