mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 13:06:22 +00:00
20 lines
329 B
Markdown
20 lines
329 B
Markdown
|
---
|
||
|
id: 7fa2a1e8-deae-47f9-83ee-e4f4f84eec16
|
||
|
title: ECMAScript Modules
|
||
|
---
|
||
|
|
||
|
# Syntax
|
||
|
|
||
|
``` javascript
|
||
|
import ordinal from "ordinal";
|
||
|
import {days, months} from "date-names";
|
||
|
|
||
|
export function formatDate(date, format) { /* ... */ }
|
||
|
```
|
||
|
|
||
|
## Default export
|
||
|
|
||
|
``` javascript
|
||
|
export default ["Winter", "Spring", "Summer", "Autumn"];
|
||
|
```
|