ES6 new feature development WeChat applet (7)

Source: Internet
Author: User
Before ES6, the community developed some module loading solutions, mainly including CommonJS and AMD. The former is used for servers, and the latter is used for browsers. In terms of language specifications, ES6 implements module functions and is quite simple to implement. it can completely replace the existing Com... before ES6, the community developed some module loading solutions, mainly including CommonJS and AMD. The former is used for servers, and the latter is used for browsers. ES6 implements module functions in terms of language specifications and is quite simple to implement. it can completely replace the existing CommonJS and AMD specifications and become a common module solution for browsers and servers.

Modules (module)

Each ES6 module is a file containing JS code. the module is essentially a script, rather than defining a module with the module keyword. By default, all modules run in strict mode. The module function consists of two commands: export and import. The export command is used for user-defined modules and defines external interfaces. the import command is used to enter functions provided by other modules and create namespaces to prevent function name conflicts.

Export

Export is used to export functions and objects from a given file (or module.

The above is a detailed description of ES6's new feature development applet (7). For more information, see other related articles in the first PHP community!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.