Fix typos

Fix typos
This commit is contained in:
Darren Scerri
2017-12-11 23:29:26 +01:00
parent e5562f2674
commit b75b9c3fb6
2 changed files with 5 additions and 5 deletions

View File

@ -0,0 +1,7 @@
### Count occurrences of a value in array
Use `filter()` to create an array containing only the items with the specified value, count them using `length`.
```js
var countOccurrences = (arr, value) => arr.filter(v => v === value).length;
```