wiki/content/20200916172914-ecmascript.md

21 lines
346 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-29 18:27:12 +00:00
date: 2020-09-16
2024-05-06 20:40:05 +00:00
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"];
```