repl.it
@isreal/

test-scores-eval-question-4

JavaScript

No description

fork
loading
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Write a function that accepts an array of test scores as an
// argument. The function should return the number of test scores that
// were an 80 or higher.

let scores = [90,78,52,13,110]

function testScores(score){
scores.filter(function(score){
  return scores >= 80}).length;
}

//.filter(function(x){return x==2}).length instead)
//words.filter(word => word.length > 5)
Native Browser JavaScript
?