The name of Array.prototype.includes

Axel Rauschmayer rauschma at icloud.com
Tue Oct 13 20:33:13 UTC 2015


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





More information about the es-discuss mailing list