I'm writing Javascript for the first time and am stuck. For this program, I am supposed to categorize the scores as A = 90 – 100, B = 80-89, C = 70 – 79, D = 60 -69 and F <60. Then print the message out that there are x A’s, x B’s, x C’s , x D’s and x F’s.where x is the amount of number of scores falling into the category. How would I go about this?
</body>
</html>
<!DOCTYPE html>
<head>
</head>
<body>
<script type = "text/Javascript">
function testScores(){
scores = ["65", "75", "99", "82", "77", "100", "75", "88", "100", "75" ];
}
function sortScores(){
for(i=1; i<=9; i = i+1)
document.write(scores[i] + " ");
}
</script>
<button type="button" onclick = "testScores();sortScores()"> Test Scores </button>
</body>
</html>