refactoring (#4)

This commit is contained in:
2021-04-10 19:17:18 +02:00
committed by GitHub
parent 9cf66c7435
commit 24a07c4588
21 changed files with 240 additions and 173 deletions

View File

@ -0,0 +1,7 @@
const CountOccurences = (arr, value) => {
return arr.filter((v) => (v === value)).length;
};
module.exports = { CountOccurences };
//console.log(countOccurrences([1,2,3,4,3,2,3,3,2],2));