You are viewing a single comment's thread. Return to all comments →
javascript:
function plusMinus(arr) { let positivo = 0; let negativo = 0; let cero = 0;
for(let i = 0; i < arr.length; i++){ if(arr[i] > 0){ positivo++; } else if(arr[i] < 0){ negativo++; } else if(arr[i] == 0){ cero++; } } console.log(positivo / arr.length); console.log(negativo / arr.length); console.log(cero / arr.length);
}
Seems like cookies are disabled on this browser, please enable them to open this website
Plus Minus
You are viewing a single comment's thread. Return to all comments →
javascript:
function plusMinus(arr) { let positivo = 0; let negativo = 0; let cero = 0;
}