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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started