Eduard Florinescu
Eduard Florinescu

Reputation: 17521

Where can I learn JavaScript features not yet included in ECMAScript standard?

I just tried in Firebug console,

let (X=10) X/2

and

[x,y]=[y,x]

These are features supported by SpiderMonkey, I guess V8 has its own share.

Where can I learn of features that are not yet included in ECMAScript, but work in various browsers? Is there a place where these are collected together?

Upvotes: 3

Views: 895

Answers (4)

James Edward Lewis II
James Edward Lewis II

Reputation: 131

That first feature is known as a "let expression" and it is nonstandard; it was dropped from Firefox 41, and the similarly nonstandard "let block" was dropped from Firefox 44: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#Non-standard_let_extensions

I was surprised to find that this particular non-standard JS was not mentioned in Kangax's table, but I guess he had to restrict this list to non-standard JS extensions that are supported by multiple engines: https://kangax.github.io/compat-table/non-standard/

If you want to go deeper down the rabbit-hole, and Kangax and MDN haven't satisfied your curiosity, this old reference may tell you about curiosities in older browsers: help.dottoro.com/ljsdaoxj.php

Beyond that, the browser-makers usually document the quirks of their own browsers (MDN is also good about documenting non-Mozilla quirks, but it's not perfect); speaking of quirks, Peter-Paul Koch documents both standard and non-standard DOM methods here: quirksmode.org/dom/


Anyway, these aren't just "not yet" in the standards, but likely "not ever" and you shouldn't use them in your own code.

Upvotes: 3

Axel Rauschmayer
Axel Rauschmayer

Reputation: 25741

ECMAScript 6 (a.k.a. ECMAScript 2015) is the current standard for JavaScript, but engines have yet to implement it completely:

Starting with ECMAScript 2016, there will be yearly releases and a new release process:

If you want to use any of the new features even on older engines, you can transpile them to ES5 via Babel: https://babeljs.io/

Upvotes: 9

JAR.JAR.beans
JAR.JAR.beans

Reputation: 10004

And here is a article covering various resources around Harmony/ES6/Javascript.next:

http://addyosmani.com/blog/ecmascript-6-resources-for-the-curious-javascripter/

Upvotes: 5

Endre Simo
Endre Simo

Reputation: 11551

For current ECMAScript 264 implementation here is a list of features supported by different browser vendors: http://kangax.github.com/es5-compat-table/

For the next generation ECMAScript Harmony some resources:

http://addyosmani.com/blog/ecmascript-6-resources-for-the-curious-javascripter/

http://kangax.github.com/es5-compat-table/es6/

Upvotes: 1

Related Questions