Skip to content

Instantly share code, notes, and snippets.

@Jxrgxn
Created July 9, 2016 06:38
Show Gist options
  • Save Jxrgxn/c780830f38fe9335edae93e44cb254fe to your computer and use it in GitHub Desktop.
Save Jxrgxn/c780830f38fe9335edae93e44cb254fe to your computer and use it in GitHub Desktop.
//beginning fuction
function countScores(Array) {
array = Array;
x = 0;
//creating a variable that iterates the array and houses the new info.
//for (var x = 0; x < array.length; x++){
for (var y in array) {
//define segregation criteria
if (array[y] > 50){
x++;
}
//count input that meets segregation criteria
//return revised info
}
return x;
}
scores = [25, 75, 33, 66, 51];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment