ES7 brings two new features
medium.freecodecamp.org
medium.freecodecamp.org
"Contains" is used everywhere else - the DOM API included (Element.classList.contains).
~array.indexOf(a)
https://www.joezimjs.com/javascript/great-mystery-of-the-til...* async functions
* shared buffers (between workers) and atomic operations for these buffers
* additional native object methods (Object.values, Object.entries, Object.getOwnPropertyDescriptor, string padding)
* trailing commas in function argument lists (definition & callsite)
* unicode case folding in /ui
All one can say about it is that it was promoted to Stage 1 18 days ago, that the spec is not currently written, and that it has two dozen issues opened against it.
Hence the official terminology is ES2015, ES2016 etc. "ES6" stayed there in dev parlance because it was the initial name while the work was in progress.
Indeed, and so that people understand the concept of "finished", "TC39" (ECMAScript) proposals have 5 stages:
* Stage 0 (strawman), having an idea
* Stage 1 (proposal), making a formal proposal explaining the problem, the general shape of a solution, an example high-level API, and identifying cross-cutting concerns and issues
* Stage 2 (draft) is the writing of the formal specification
* Stage 3 (candidate) is the completion of the formal specification and its sign-off by reviewers and the ECMAScript editor, no further work is possible without implementation feedback
* Stage 4 (finished) is a test262 acceptance test suite and two independent compatible implementations, the feature will be included in the next ECMAScript standard revision
> life.includes('girlfriend') // false
That are some depressing code examples, is the author ok?
What did you expect? Louis CK?
Being able to still joke about things is a good sign anyway -- even if you feel those things.
In fact, aside from Edge which lags a bit behind (and FF 52 ESR) all of them seem to have full ES2017 support already in their latest stable.
As for availability of these two features: stable Chrome supported Array.prototype.includes in Dec 2015 and in Jul 2016; stable Firefox supported these in Dec 2015 and Mar 2017, respectively. I guess you could say that these features were widely available in 2016, _just if you use Chrome_, but that's not a satisfying answer.
MDN pages:
[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Dates for corresponding browser versions drawn from the wikipedia pages:
[2] https://en.wikipedia.org/wiki/Firefox_version_history
[3] https://en.wikipedia.org/wiki/Google_Chrome_version_history