当前位置:网站首页>ES6 module
ES6 module
2022-06-28 23:47:00 【Run Coder】
ES6 modular
- ES6 The module of grammar
| Code | meaning |
|---|---|
| export const ninja = ‘Yoshi’; | Export variables |
| export function ninja(){}; | The export function |
| export class Ninja{}; | Export class |
| export default class Ninja{}; | Export default class |
| export default function Ninja(){}; | Export default function |
| const ninja = ‘Yoshi’; function compare(){}; export {ninja,compare}; | Export existing variables |
| export{ninja as samurai,compare}; | Export variables using aliases |
| import Ninja from ‘Ninja.js’; | Import default export |
| import {ninja,Ninja} from ‘Ninja.js’; | Import named export |
| import * as Ninja from ‘Ninja.js;’ | Import all the import contents declared in the module |
| import {ninja as Ninja} from ‘Ninja.js’; | Import all exports declared in the module by alias |
- ES6 The characteristics of the module .
- ES6 Modules are based on files , A file is a module
- By keyword export Export identifier , These identifiers can be referenced in other modules .
- In other modules, you can use keywords import Import identifiers .
- Modules can use the default Export , Through one export Export the entire module .
- export And import You can use keywords as Use the alias .
Time and again , Not dying . Ideal discard , In his twilight years .
边栏推荐
- VSCode里使用条件断点(基于GDB)
- Would like to ask, how to open a stock account? Is it safe to open an account online?
- 是使用local_setup.bash 还是 setup.bash
- [Electronic Experiment 2] simple electronic doorbell
- Yyds dry inventory solution sword finger offer: maximum sum of continuous subarrays (II)
- 移动端异构运算技术 - GPU OpenCL 编程(基础篇)
- Form verification problem - El select (solution to automatically trigger verification on initialization page)
- Huawei's level 22 experts have worked hard for ten years to complete the advanced practical document of cloud native service grid. 6
- PHP uses endroid/qrcode QR code to generate, and Gd library generates sharing posters
- Machine learning 6-decision tree
猜你喜欢

【狀態機設計】Moore、Mealy狀態機、三段式、二段式、一段式狀態機書寫規範

Analysis of CSRF Cross Site Request Forgery vulnerability

随笔记:定义setter和getter的三种方式

Quartz explanation and use

Stm32f407-------- NVIC interrupt priority management

The second session of question swiping and clock out activity -- solving the switching problem with recursion as the background (III)

stm32F407-------IO引脚复用映射
![SQL note 2 [MySQL]](/img/a4/f711173ce731d95860746e309b7d74.jpg)
SQL note 2 [MySQL]

Stm32f407 ------- IO pin multiplexing mapping

Be on the list again! Know that Chuangyu was selected as one of the top 50 competitive enterprises in China's network security industry in 2022
随机推荐
Mysql-5.7.30-winx64 installation free download and installation tutorial
【C Primer Plus第二章課後編程題】
Yyds dry inventory solution sword finger offer: maximum sum of continuous subarrays (II)
Yyds dry goods count 【 vs code work record III 】 set vs code format
Stm32f407 ------ running lamp and buzzer
机器学习4-降维技术
PHP uses curl to download Excel files after logging in to the website
[API packet capturing in selenium automation] installation and configuration of browsermobproxy
Learning fuzzy from SQL injection to bypass the latest safe dog WAF
TypeScript--第五节:类
Online yaml to JSON tool
The second session of question swiping and clock out activity -- solving the switching problem with recursion as the background (2)
Stm32f407----- capacitive touch button
fio的IO重放功能
Be on the list again! Know that Chuangyu was selected as one of the top 50 competitive enterprises in China's network security industry in 2022
Blue Bridge Cup top ten common heaven level skill - breath of water The type of one recursion
SQL note 2 [MySQL]
stm32F407-------电容触摸按键
What pitfalls should be avoided in the job interview for the operation post in 2022?
Lock4j -- distributed locking Middleware -- use / instance