镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Implement Array.at #39578

Description

@crfrolik

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.

Activity

  1. mscdex commented on Jul 29, 2021

    @mscdex
    Contributor

    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).

  2. crfrolik commented on Jul 29, 2021

    @crfrolik
    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.

  3. richardlau commented on Jul 29, 2021

    @richardlau
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions