Fix typos

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

View File

@ -1,7 +1,7 @@
### Count occurences of a value in array
### 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 countOccurences = (arr, value) => arr.filter(v => v === value).length;
var countOccurrences = (arr, value) => arr.filter(v => v === value).length;
```