- Notifications
You must be signed in to change notification settings - Fork716
Code examples that accompany the MDN JavaScript/ECMAScript documentation
License
NotificationsYou must be signed in to change notification settings
mdn/js-examples
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository contains examples of JavaScript usage.
The "promises-test" directory contains a JS promises test example, for learning purposes.Run the example live.
The "modules" directory contains a series of examples that explain howJavaScript modules are used. The subdirectories are as follows:
- basic-modules: Simple example that demonstrates module basics, including default exports (run the example live).
- renaming: Shows how exports can be renamed to avoid conflicts, using
x as y
syntax (run the example live). - module-objects): Shows how to import an entire module as an object using
import * as x from 'y.js'
syntax (run the example live). - classes: Provides an example of importing a class from a module (run the example live).
- module-aggregation: Shows how sub module features can be aggregated into a parent module using
export { x } from 'y.js'
syntax (run the example live). - dynamic-module-imports: Demonstrates dynamic module loading using
import().then()
(run the example live). - top-level-await: An example of using the
await
keyword within a module (run the example live).
About
Code examples that accompany the MDN JavaScript/ECMAScript documentation
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors14
Uh oh!
There was an error while loading.Please reload this page.