Засим Александр (2019-01-07T19:12:11.000Z)
Hi everyone. This is proposal for Array.prototype.count (or countOf) method
which allow to count specific elements in an array.

```js

const evenNumberCount = [1, 2, 3, 4, 5].count(num => num % 2 === 0);

```

Instead of 

```js 

const evenNumberCount = [1, 2, 3, 4, 5].filter(num => num % 2 === 0).length;

```

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190107/f59e8763/attachment.html>
forbes at lindesay.co.uk (2019-01-07T21:52:08.369Z)
This is proposal for Array.prototype.count (or countOf) method
which allow to count specific elements in an array.

```js
const evenNumberCount = [1, 2, 3, 4, 5].count(num => num % 2 === 0);
```

Instead of 

```js 
const evenNumberCount = [1, 2, 3, 4, 5].filter(num => num % 2 === 0).length;
```