랭킹으로 돌아가기
Code examples that accompany the MDN JavaScript/ECMAScript documentation
javascriptecmascriptexamplesmdn
주요 지표
스타 성장
스타
1.3k
포크
724
주간 성장
—
이슈
1
5001k
2017년 2월2018년 8월2020년 3월2021년 10월2023년 5월2024년 12월2026년 7월
아티팩트npm
npm install js-examplesREADME
js-examples
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 how JavaScript 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 ysyntax (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
awaitkeyword within a module (run the example live).
관련 저장소