第一眼看到,什么鬼?

const { body } = document
``

其实等于:

const body = document.body


http://es6.ruanyifeng.com/#docs/destructuring#对象的解构赋值

![](http://images2015.cnblogs.com/blog/213419/201608/213419-20160804210503606-1630501216.png)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
  • 2022-01-29
  • 2022-02-10
相关资源
相似解决方案