Create a function called "countInRange" that accepts a list of numbers as an argument and returns the count of values in the input that fall between 15.3 and 42.19, exclusive of these endpoints. Check out my implementation below:
function countInRange(numbers){
var total = 0;
for (var i of numbers){
if (i > 15.3 && i < 42.19){
total++;
}
}
return total;
}
Since switching to JavaScript, I've been consistently receiving a result of 1 instead of the expected count of values that meet the criteria.