Skip to content

Feature/array includes#796

Merged
Perryvw merged 3 commits intomasterfrom
feature/array-includes
Jan 12, 2020
Merged

Feature/array includes#796
Perryvw merged 3 commits intomasterfrom
feature/array-includes

Conversation

@Perryvw
Copy link
Copy Markdown
Member

@Perryvw Perryvw commented Jan 10, 2020

Closes #794

}

while (k < len) {
if (this[k] === searchElement) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW .includes uses a different comparison algorithm

[NaN].indexOf(NaN) // => -1
[NaN].includes(NaN) // => true

But I'm okay with leaving it as an edge case

@Perryvw Perryvw merged commit ea07f80 into master Jan 12, 2020
@Perryvw Perryvw deleted the feature/array-includes branch January 12, 2020 21:15
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

Successfully merging this pull request may close these issues.

Missing method Array.includes()

2 participants