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

item() proposal does not substitute this proposal #32

Open
drpicox opened this issue Aug 5, 2020 · 1 comment
Open

item() proposal does not substitute this proposal #32

drpicox opened this issue Aug 5, 2020 · 1 comment

Comments

@drpicox
Copy link

drpicox commented Aug 5, 2020

Although it seems that:

const last = array.lastItem;
const last = array.item(-1);

both are equivalent, they are not:

array.lastItem = newValue;
array.item(-1) = newValue; // it does not make sense

the assignation is not part of the .item() proposal.

I have seen in the issues of this proposal interesting alternatives like:

See tc39/proposal-relative-indexing-method#16 for the mirroring of this issue.

@keithamus
Copy link
Member

I'm not sure assignment has a convincing enough use case to warrant being specced. See #16

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

No branches or pull requests

2 participants