Created
August 15, 2017 15:53
-
-
Save VoloshchenkoAl/6bd902d72cce68a4ba09a5b4337e5f77 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 countHolders(array, placeholder) { | |
var length = array.length, | |
result = 0; | |
while (length--) { | |
if (array[length] === placeholder) { | |
++result; | |
} | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment