Currently, I got an array like that:
var uniqueCount = Array();
After a few steps, my array looks like that:
uniqueCount =
I think this is the simplest way how to count occurrences with same value in array.
var a = [true, false, false, false]; a.filter(function(value){ return value === false; }).length