eric at ericleads.com
Wed Mar 5 00:24:34 PST 2014
What ever happened to Array.prototype.contains? There's an old strawman for
http://wiki.ecmascript.org/doku.php?id=strawman:array.prototype.has ) that
references this thread: (
But it seems the thread fizzled out a couple years ago, and
Array.prototype.contains didn't seem to make its way into ES6. That seems
odd, since we do have String.prototype.contains, and it seemed like it was
desirable for DOM. It's also a standard utility function in several
Was it left out on purpose? If so, what was the justification?
I predict code like this without it:
''.contains.call([1, 2, 3], 2); // true
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss