Skip to main content

Use of Switch Case in JAVASCRIPT:

 How to check week day from  week number  ?

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Check week day</title>
</head>
<body>
    <script>
    var a = prompt("enter Week Number");
 switch(a){
    case '1':
        document.write("Monday");
        break;
         case '2':
        document.write("Tuesday");
        break;
        case '3':
        document.write("Wednesday");
        break;
        case '4':
        document.write("Thursday");
        break;
        case '5':
        document.write("Friday");
        break;
        case '6':
        document.write("Saturday");
        break;
        case '7':
        document.write("Sunday");
        break;
        default:
        document.write("please write correct week number");
   
 }
 </script>
</body>
</html>
<----output you will get after run this code---->

Comments

Popular posts from this blog

How To Make Clone NETFLIX Webpage

 How To Make Clone NETFLIX Webpage...... With the Help of HTML CSS and JAVASCRIPT... <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta http-equiv = "X-UA-Compatible" content = "IE=edge" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > Netflix Clone </ title >     < script src = "https://kit.fontawesome.com/a02bd9801f.js" crossorigin = "anonymous" ></ script > < link rel = "stylesheet" href = "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css" >         < style >         body {             display : flex ;             justify-content : center ;             align-items : center ;         ...

What is HTML?

  HTML stands for HyperText Markup Language . It is used to design the front end portion of web pages using markup language. It acts as a skeleton for a website since it is used to make the structure of a website.

Amazed Animation Properties in CSS3

  Amazed Animation Properties in CSS3 <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta http-equiv = "X-UA-Compatible" content = "IE=edge" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > Animation box </ title >     < style >         .container {             width : 100% ;             height : auto ;                 }         .para {                         height : auto ;         }         body {             background : black ;             color : white ;         } ...