Answer:
Explanation:
Program :
var percentage= prompt("Enter the percentage of the student"); // take the input from the user.
if(percentage>=90)//check condition for greator than 90.
alert("your grade is \"A\"");
else if(percentage>=80) // check condition for 80 and 89.
alert("your grade is \"B\"");
else if(percentage>=70) // check condition for 70 and 79.
alert("your grade is \"C\"");
else if(percentage>=60) // check condition for 60 and 69.
alert("your grade is \"D\"");
else // check condition for less than 60.
alert("your grade is \"F\"");
Output:
Code Explanation: