0

When I open the Chrome Developer Tools JavaScript console to get a REPL, the version of JavaScript it uses seems lower than 1.8. let statements, new style functions, etc. give me syntax errors. Is there any way to change the JavaScript version used?

Thanks in advance.

1
  • The MDN page for each feature you're looking for will tell you whether you can expect them in another engine -- e.g., let is "Non-Standard." But, many of these features have been and are being discussed for ECMAScript 6 and later under the Harmony and Strawman namespaces. Commented Jun 18, 2012 at 15:29

1 Answer 1

4

Chrome's JS engine conforms most closely to ECMAScript 5. The JavaScript version numbering scheme comes from Mozilla, and features such as let statements, yield, and others are Mozilla-only extensions to JavaScript.

Sign up to request clarification or add additional context in comments.

1 Comment

I see. I didn't know that. Looks like destructuring assignment isn't available either. :(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.