Exam4Training

How should the developer implement the request?

A developer has the following array of student test grades:

Let arr = [ 7, 8, 5, 8, 9 ];

The Teacher wants to double each score and then see an array of the students

who scored more than 15 points.

How should the developer implement the request?
A . Let arr1 = arr.filter(( val) => ( return val > 15 )) .map (( num) => ( return num *2 ))
B . Let arr1 = arr.mapBy (( num) => ( return num *2 )) .filterBy (( val ) => return val > 15 )) ;
C . Let arr1 = arr.map((num) => num*2). Filter (( val) => val > 15);
D . Let arr1 = arr.map((num) => ( num *2)).filterBy((val) => ( val >15 ));

Answer: C

Exit mobile version