-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyntaxError: Unexpected reserved word #558
Comments
Currently Classes are behind the --es_staging flag and in strict mode only. https://iojs.org/es6.html This is because the spec had to be reconsidered a bit and the implementation has to be slightly adjusted. Class support should land when we ship the stable version of v8 4.1. (still going to be a few weeks at least). |
ES6 class syntax isn't supported yet – it was pulled from v8 due to some retooling of the spec as I understand it. It should be in soon, though; and it's available behind the |
Oh, looks like you tried to run it with The |
e.g. |
Yesterday installed the new iojs version with nvm install iojs-v1.0.3 then wrote my first class definition. But for my disappointment i got the following error when tried to run a simple file:
The content of the file:
I ran it with:
node --harmony es6/class.js
also tried it with
What i checked:
The text was updated successfully, but these errors were encountered: