The most direct manifestation of modularity is the require and import keywords we have written. If you look at the relevant information, you will surely encounter CommonJS, AMD, and other unfamiliar frameworks such as RequireJS and SeaJS. For example, the official website of SeaJS described itself as follows: "simple and user-friendly module definition specifications. Sea. js follows the CMD specifications. Naturally and intuitively organize code, and automatically load dependencies ......" Preface
The most direct manifestation of modularity is the require and import keywords we wrote. If you look at the relevant information, you will surely encounter CommonJS, cmd amd terms, and unfamiliar frameworks such as RequireJS and SeaJS. For example, the official website of SeaJS described itself as follows: "simple and user-friendly module definition specifications. Sea. js follows the CMD specifications. Naturally and intuitively organize code, and automatically load dependencies ......"
As a beginner at the front-end, I said it was really awesome and I couldn't understand it. According to my consistent style, I have to explain why I need something before introducing it.
JavaScript Basics
Clients should be familiar with the # import "classname" of OC, the Module of Swift, the file modifier, and the import package + class mode of Java. We are used to referencing a file as a class. However, in the Dynamic Language of JavaScript, things have some changes. For example: