Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

Should lastIndex return 0 if there are no items in the array? #21

@egeriis

Description

@egeriis

I'm wondering if it would be better to follow the same pattern as indexOf and return -1 for lastIndex, when there are no items in the array. Returning 0 would mean that it's not possible to distinguish an array with 0 and an array with 1 element.

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