On Sat, Jun 11, 2016 at 12:01 AM Oriol Bugzilla <oriol-bugzi...@hotmail.com> wrote:
> Array.prototype.includes uses the second argument as the starting index. > > Therefore, these calls would be identical, but you want them to behave > differently: > > ``` > ["a"].includes("a", 0); // true -- "a" can be found at position 0 > ["a"].includes(...["a", 0]); // false -- 0 can't be found in the array > ``` > > So no, it wouldn't work well. Moreover, why every and not e.g. some? > > But maybe new methods could be added, like includesEvery and includesSome. > Right. I should've checked that. Yup, `.includesEvery` and `.includesSome` seem nice. I would call the latter `.includesAny`, I think.
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss