Turn numeric scores into grade report objects.
Turn a numeric score into a grade report. The report should include the letter grade, whether the student passed, and a short feedback message.
Write these functions:
getLetterGrade(score) should return "A", "B", "C", "D", or "F" based on the score.
hasPassed(score) should return true when the score is 60 or higher.
getFeedback(grade) should return a short message for the grade.
createGradeReport(name, score) should return one object with name, score, grade, passed, and feedback.
Sample checks:
Expected output:
Use the grade from getLetterGrade when choosing the feedback.
Join the Community
roadmap.sh is the most starred project on GitHub and is visited by hundreds of thousands of developers every month.
Roadmaps Best Practices Guides Videos FAQs YouTube
roadmap.sh by @kamrify @kamrify
Community created roadmaps, best practices, projects, articles, resources and journeys to help you choose your path and grow in your career.
Login or Signup
You must be logged in to perform this action.