The name of Array.prototype.includes
# Domenic Denicola (9 years ago)
https://github.com/tc39/Array.prototype.includes#why-includes-instead-of-has > -----Original Message----- > From: es-discuss [mailto:es-discuss-bounces at mozilla.org] On Behalf Of Axel > Rauschmayer > Sent: Tuesday, October 13, 2015 16:33 > To: es-discuss mailing list <es-discuss at mozilla.org> > Subject: The name of Array.prototype.includes > > There are two existing methods that are loosely similar to > `Array.prototype.includes()`: > > 1. `String.prototype.includes()` > 2. `Set.prototype.has()` > > Isn’t #2 more similar than #1? Shouldn’t the method be called > `Array.prototype.has`, then? > > -- > Dr. Axel Rauschmayer > axel at rauschma.de > rauschma.de > > > > _______________________________________________ > es-discuss mailing list > es-discuss at mozilla.org > https://mail.mozilla.org/listinfo/es-discuss
There are two existing methods that are loosely similar to
Array.prototype.includes()
:String.prototype.includes()
Set.prototype.has()
Isn’t #2 more similar than #1? Shouldn’t the method be called
Array.prototype.has
, then?