On 3/10/15, Andrea Giammarchi <[email protected]> wrote: > contains better than indexOf ? I'd agree only if contains wasn't accepting > any extra argument, which makes it even more (pointless?) similar to > indexOf. > > If it had only one incoming parameter, you could have `["maria", > "marianne"].some(str.contains, str)` and win over all other examples. but > just the `!=-1` or `>-1` as reason to prefer contains? ... dunno, I think I > have 99 problems in JS related development, `>-1` ain't one :-/ >
Evidently. I can only guess that str is a string. Strings don't have a contains method, nor was one proposed the call str.contains(str) inside of a call to some looks like a confused mistake. -- Garrett @xkit ChordCycles.com garretts.github.io personx.tumblr.com _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

