18 Short exercises for Murach's JavaScript and jQuery (4th Edition) Short 12-1 Improve the validation of the Countdown a

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

18 Short exercises for Murach's JavaScript and jQuery (4th Edition) Short 12-1 Improve the validation of the Countdown a

Post by answerhappygod »

18 Short Exercises For Murach S Javascript And Jquery 4th Edition Short 12 1 Improve The Validation Of The Countdown A 1
18 Short Exercises For Murach S Javascript And Jquery 4th Edition Short 12 1 Improve The Validation Of The Countdown A 1 (140.93 KiB) Viewed 21 times
18 Short exercises for Murach's JavaScript and jQuery (4th Edition) Short 12-1 Improve the validation of the Countdown application In this exercise, you'll improve the validation for the date entered by the user in the Countdown application in chapter 12. When you're done, this application should display specific error messages for dates with invalid months or days. Estimated time: 15 to 25 minutes. Countdown To... Event Name: test day Event Date: 13/33/2020 Countdown! Please enter the date in MM/DD/YYYY format. 1. Open the application in this folder: exercises_short\ch12\countdown 2. Start the application, enter an invalid date like the one shown above, and note that the error message doesn't accurately describe the error. 3. In the JavaScript file, find the if statement that checks whether the date string has a four-digit year. Following this code, add code that gets the month and day from the dateParts array that was created earlier in the code. 4. Add code that checks that a valid day was entered depending on the month that was entered. For example, April can have the days 1 through 30, and May can have the days 1 through 31. Be sure to account for leap years, which are years that are evenly divisible by 4. If the days are invalid, display an appropriate error message and return. 5. Add code that displays an error message and returns if a month other than 1 through 12 are entered.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply