Question: with switch Exercise #1 Write a JavaScript code that reads a number between 1 and 7 and print the corresponding day of the week. Days
Exercise #1 Write a JavaScript code that reads a number between 1 and 7 and print the corresponding day of the week. Days of the week are numbered as follows: {1: Sunday, 2: Monday, 3: Tuesday, 4: Wednesday, 5: Thursday, 6: Friday, and 7: Saturday). The script should output an error message if the number is outside the range 1 to 7. Test your code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
