Simple page for Javascript Demo

This text was created by HTML.


<script language="JavaScript">
var average;

average = parseInt(window.prompt("Enter your class average","75"));
document.write("Your score was " + average + "<br>");

if (average > 90)
  document.write("You earned an A<br>");
if (average > 80)
  document.write("You earned a B<br>");
if (average > 70)
  document.write("You earned a C<br>");
if (average > 60)
  document.write("You earned a D<br>");
if ( average <= 60)
  document.write("You earned an F<br>");
</script>