Array.prototype.contains

Andrea Giammarchi andrea.giammarchi at gmail.com
Fri Nov 2 10:28:21 PDT 2012


+1 ... but funny that for Strings I would naturally use "mychunk" in
mystring rather than mystring.has("mychunk") .... I believe contains comes
from XSL, isn't it? Was it W3C suggestion or what?


On Fri, Nov 2, 2012 at 10:20 AM, Erik Arvidsson <erik.arvidsson at gmail.com>wrote:

> On Fri, Nov 2, 2012 at 12:30 PM, Mark S. Miller <erights at google.com>
> wrote:
> > I also support calling it "has" as Rick suggests. Perhaps this also helps
> > suggest that it is like the other "has"s, which use SameValue, and not
> like
> > indexOf.
> >
> > (I am still sad we did not fix indexOf, lastIndexOf, and switch when we
> > arguably had the chance.)
>
> If we call it "has", should we also rename String.prototype.contains?
>
> --
> erik
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121102/9e4d89e8/attachment.html>


More information about the es-discuss mailing list