97

ECMAScript 6 之用模块封装代码

 6 years ago
source link: https://juejin.im/post/5a851d6a6fb9a0635f7e807c
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
JavaScript 用“共享一切”的方法加载代码,这是该语言中最容易出错且最容易让人感到困惑的地方。其他语言使用诸如包这样的概念来定义代码作用域,但在 ECMAScript 6 以前,在应用程序的每一个 JavaScript 中定义的一切都共享一个全局作用域

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK