Why is "export default var a = 1;" invalid syntax?

Bucaran jbucaran at me.com
Wed May 6 05:18:55 UTC 2015


Read as much as I could, but it was getting too long, so just to quickly summarize:

While you can’t:


```js
export default let a = 1
``` 


You certainly can:


```js
let a = 1
export default a
```

Or 

```js
let a = 1
let b = 2
let c = 3

export default {
 A: a,
 B: b,
 C: c
}
```

Cheers


More information about the es-discuss mailing list