javascript - Java Script, Need help finding my error -
<script type="text/javascript"> var score = prompt("enter score. grade must between 100-0."); if ( score>==90 ) { document.write ( "your grade a." ) } else if ( score <89>==80 ) { document.write ( "your grade b." ) } else if ( score <79>==70 ) { document.write ( "your grade c.") } else if ( score <69>==60 ) { document.write ( "your grade d.") } else if ( score <59>==0 ) { document.write ( "your grade f") } }//end if </script>
should
if ( score>==90 ) { document.write ( "your grade a." ) } else if ( score >==80 ) { document.write ( "your grade b." ) } else if ( score >==70 ) { document.write ( "your grade c.") } else if ( score >==60 ) { document.write ( "your grade d.") } else if ( score >==0 ) { document.write ( "your grade f") }
Comments
Post a Comment