Question: only you should use reduce,map,filter make sure to solve the question correctly +Do not copy the answer from other question on it is wrong -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

only you should use reduce,map,filter

make sure to solve the question correctly +Do not copy the answer from other question on it is wrong

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

6.Create an array named students

7. Create a loop that asks the user to add 5 students. You should only ask the user the name and gender of the student. The age and grade of the students should be randomly generated. The age should be between [17 - 35] and the grade should be between [0 and 100] inclusive.

Sample: the students array after adding the five students should look something like this [ { name: \'Hani\', gender: \'Male\', grade: 92, age: 19 }, { name: \'Ahmed\', gender: \'Male\', grade: 81, age: 30 }, { name: \'Sara\', gender: \'Female\', grade: 99, age: 24 }, { name: \'Emany\', gender: \'Female\', grade: 50, age: 26 }, { name: \'Issa\', gender: \'Male\', grade: 70, age: 24 } ]

8. The write the code that answers the following questions

a. Find the student with the highest grade

b. Find both the youngest and oldest student in the class

c. Find the average and median student age in the class

d. Calculate the mean and variance of the student grades.

Note: Do not use the traditional loops to solve the above questions. You should use the arrow function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!