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 Calculator with easy coding

  <! 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 > New Calculator </ title >     < link rel = "stylesheet" href = "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.4/font/bootstrap-icons.css" >     < link rel = "stylesheet" href = "style.css" >     < script src = "https://kit.fontawesome.com/a02bd9801f.js" crossorigin = "anonymous" ></ script > </ head > < body >     < div class = "container" >         < div class = "screen" >             < textarea name = "text" id = "text" cols = "30" rows = "7" readonly...

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 Web-Development ?

i) Web development refers to the creating, building, and maintaining of websites.  ii) It includes aspects such as web design, web publishing, web programming, and database management. iii)  It is the creation of an application that works over the internet for e.g websites. The word Web Development is made up of two words, that is: Web:  It refers to websites, web pages or anything that works over the internet. Development:  It refers to building the application from scratch.