Objective

Given the score of a test, output the corresponding grade as per a grade threshold table.

Difficulty

Very easy

Description

Recently a 100 mark JavaScript test was conducted at a bootcamp teaching modern web technologies.

The test was a 3-hour test with tons and tons of questions on JavaScript and its browser environment. The grade threshold of the test is shown as follows:

GradeMarks
A90 - 100
B75 - 89
C60 - 74
D50 - 59
E40 - 49

In this exercise, you have to ask the user to enter a score that a person obtained in this test, via a prompt input, and then alert back the corresponding grade as per the threshold table shown above.

If the entered score is not a recognizable value, the code must alert 'Invalid value'.

Here's a live example of what you ought to achieve:

Live Example