Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 300 Bytes

File metadata and controls

10 lines (8 loc) · 300 Bytes

推荐阮一峰老师的《ECMAScript 6入门》

下面是实际项目中写 ES6 代码时的注意点:

1、 Object.assign() 中解决 targetnull 的情况:

let target = null;
const source = { a: 1 };
target = Object.assign({}, target, source);