Question: 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

 Exercise #1 Write a JavaScript code that reads a number between

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!