Student Grade Rest Parameter
Pass the rest parameter prefixed with three dots (…) as an argument to implement the function calculateAverageMark() – calculateAverageMark(…args)
Calculate the average mark of the student and return it.
Then, this average is used to determine the corresponding grade.
Return the output with 2 decimal places.
Implement the calculateStudentGrade() function to calculate the student grade based on the average mark.
The average mark returned by the function calculateAverageMark() is passed as argument to this function.
The grades are computed as follows:
Note: You may verify the correctness of your function by invoking it from within console.log as shown in sample input and output
Sample Input and Output:
console.log(calculateAverageMark(80, 77, 88, 95, 68));
var averageMarks= calculateAverageMark(80, 77, 88, 95, 68);
Solution will be released after 150 clicks. How to increase clicks? Click on any AD’s on our site, help us keep running this site as we work for you. 1 person 2 AD Clicks.
- Student Grade Rest Parameter
- Employee Salary Appraisal
- Collection Set E-sale
- Collection Map Weather Report
- Car Price Default Parameter