0% found this document useful (0 votes)
2 views1 page

Swi

The document is an HTML page that contains a JavaScript script to display the name of the day of the week based on a numeric value. In this case, the value is set to 5, which corresponds to 'Friday'. The script uses a switch statement to determine and output the correct day or an 'Invalid day' message for values outside the range of 1 to 7.

Uploaded by

Shruti Shevade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Swi

The document is an HTML page that contains a JavaScript script to display the name of the day of the week based on a numeric value. In this case, the value is set to 5, which corresponds to 'Friday'. The script uses a switch statement to determine and output the correct day or an 'Invalid day' message for values outside the range of 1 to 7.

Uploaded by

Shruti Shevade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

<!

DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Day of the Week</title>
</head>
<body>
<script>
let day = 5;
switch (day) {
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("Invalid day");
}
</script>
</body>
</html>

You might also like