Created
February 17, 2020 04:22
-
-
Save bitfishxyz/41b4d1a072bdabbc108065d1ceae6cd9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function count(arr, targetValue){ | |
let count = 0; | |
for(let ele of arr){ | |
if (ele === targetValue) { | |
count++; | |
} | |
} | |
return count | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment