I have an array of elements assembled by:
timeArray = [];
$('.time_select').each(function(i, selected) {
timeArray[i] = $(selected).val();
});
where .time_select
is a class on a group of different HTML select tags.
What I'd like to do is count the number of times a specific value occurs in timeArray
. Strangely enough, I haven't found any concise solution... surely there's a simple way to do this?