We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Apply
  • Hiring developers?
  1. Prepare
  2. Tutorials
  3. 10 Days of Javascript
  4. Day 2: Conditional Statements: If-Else
  5. Discussions

Day 2: Conditional Statements: If-Else

Problem
Submissions
Leaderboard
Discussions
Editorial
Topics

    You are viewing a single comment's thread. Return to all comments →

  • shady36288
    7 months ago+ 1 comment

    function getGrade(score) {

    const grades = ["F","E","D","C","B","A"];
    
    return grades[Math.round(Math.trunc(score/5))];;
    

    }

    0|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy