Array.prototype.includesAll

Oriol Bugzilla oriol-bugzilla at hotmail.com
Tue Jun 14 19:32:32 UTC 2016


> There are no items in `[]` so that doesn't seem like a true statement to me.

It's true by [Vacuous_truth](https://en.wikipedia.org/wiki/Vacuous_truth).

> So, at least consistency pulls towards `false`.

You are misunderstanding what `includes` does when there is no argument.

```js
[1].includes(); // false
[void 0].includes(); // true
```

Consistency with `every` pulls towards `true`.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160614/c079994e/attachment.html>


More information about the es-discuss mailing list