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

Glen Huang curvedmark at gmail.com
Fri Dec 12 20:19:22 PST 2014


Hi,

From https://people.mozilla.org/~jorendorff/es6-draft.html#sec-exports <https://people.mozilla.org/~jorendorff/es6-draft.html#sec-exports>, it seems that "export default var a = 1;” is not valid in es6. I wonder why that’s the case. You can already do "var a = 1;export default a;”. Why not make "export default var a = 1;” valid?

Maybe I missed something. Could someone lighten me?

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141213/7b2cb9db/attachment.html>


More information about the es-discuss mailing list