I´m getting an Uncaught SyntaxError: Unexpected identifier
error in Google chrome when executing this code.
I want to calculate the number of values in edades
that are between min
and `max.
function edades(int min, int max){
var edades = [22,27,29];
var num=0;
var i;
for (i = 0; i < edades.length; i++) {
if(min<=edades[i] && edades[i]<=max){
num++;
}
}
return num;
}//edades