Created
July 9, 2016 06:38
-
-
Save Jxrgxn/c780830f38fe9335edae93e44cb254fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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