If or If else and else condition in javascript

 HTML:-




Js:-

<script type="text/javascript">

const per = 80;

if(per >= 80 && per <= 100){

    document.write("You are in marit");

}else if( per >= 60 && per < 80){

    document.write("You are in First Division");

}else if(per >= 45 && per < 60){

    document.write("You  are in 2nd Division");

}else if(per >= 33 && per < 45){ 

document.write("You are in 3rd Division");

}else if(per < 33){

    document.write("You are Fail");

}else{

document.write("Please Enter Vaild Percentage");    

}    

    

</script>


No comments:

Post a Comment