使用Spread Operator复制数组

javascript
阅读 40 收藏 0 点赞 0 评论 0

snippet.js
let thisArray = [true, true, undefined, false, null];
let thatArray = [...thisArray];
// thatArray equals [true, true, undefined, false, null]
// thisArray remains unchanged, and is identical to thatArray
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号