This commit is contained in:
Ilya Kantor 2019-07-09 04:09:08 +03:00
parent d1c2c4c082
commit 89f1604e7b
2 changed files with 5 additions and 1 deletions

View file

@ -209,11 +209,15 @@ For instance, these are all perfectly valid default exports:
export default class { // no class name
constructor() { ... }
}
```
```js
export default function(user) { // no function name
alert(`Hello, ${user}!`);
}
```
```js
// export a single value, without making a variable
export default ['Jan', 'Feb', 'Mar','Apr', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
```