Skip to content
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

Implement Array.at #39578

Closed
crfrolik opened this issue Jul 29, 2021 · 3 comments
Closed

Implement Array.at #39578

crfrolik opened this issue Jul 29, 2021 · 3 comments

Comments

@crfrolik
Copy link

Is your feature request related to a problem? Please describe.
Keep nodejs up-to-date with evolving ECMAScript/TC39 standards.

Describe the solution you'd like

Implement Array.at

Describe alternatives you've considered

Polyfills, but this is not ideal long-term.

@mscdex
Copy link
Contributor

mscdex commented Jul 29, 2021

The way node.js gets support for language features/changes is through V8, which handles all of the JavaScript parsing and execution. If/When V8 supports whatever change, then node.js will (eventually) support it.

In the particular case of Array.prototype.at, it's already available in the version of V8 in the master branch. At the very least it will be in the next major version of node.js, but in general V8 version upgrades often get backported to other existing, supported version branches as well, so you just have to wait (or make your own attempt at backporting the necessary V8 upgrades and submitting a PR appropriately if you want to see features in existing version branches sooner).

@crfrolik
Copy link
Author

Thanks for the explanation. I was thrown off by the fact that the MDN page says that Chrome already supports it, but nodejs does not, despite them both using V8.

@richardlau
Copy link
Member

richardlau commented Jul 29, 2021

FWIW Support for Array.at is one of the notable changes for the proposed Node.js 16.6.0: #39534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants