Skip to content

Javascript bug in Android: Array.keys() has problems with holes #18230

Closed
@voxspox

Description

@voxspox

The following code does not meet the specification:

var arr = ['a', , 'c'];
var sparseKeys = Object.keys(arr);
var denseKeys = [...arr.keys()];
console.log(sparseKeys); // ['0', '2']
console.log(denseKeys);  // [0, 1, 2]
// but last command output is []

Example frm MDN: Array.keys()

Running React Native 0.53.2
Android Studio 3.0.1
Android Emulator 27.1.10
Nexus 5 - API 24

This bug seems to be releated to Android. But I don't know where to report bugs for the Javascript Engine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions