Friday, October 17, 2014

Write A program to check grade using switch case using Javascript .


Write A program to check grade using switch case using Javascript .
Code : switch.html

<html>
<head>
<script type="text/javascript">
var grade=prompt("Enter grade",0);
switch(grade)
{
case 'A':
document.write("Distriction");
break;
case 'B':
document.write("First Class");
break;
case 'C':
document.write("Passed");
break;
case 'D':
document.write("Failed");
break;
default:
document.write("Unknown grade");
}
</script>
</head>
</html>

1 comment:

Kale Co Jakim said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Training in Chennai . or learn thru Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry. JavaScript Training in Chennai