Помощ за задача 8.Days in a month от JS Advanced (SYNTAX, FUNCTIONS AND STATEMENTS)
Това е моя код:
https://pastebin.com/qGLRYZuk
Ето и условието на задачата:
8.Days in a month
Write a JavaScript function to get the number of days in a month.
The input comes as two numeric parameters. The first element is the month, the second is the year.
The output must return the number of days in a month for a given year.
Examples
Input |
Output |
1, 2012 |
31 |
2, 2021 |
28 |
Hints
- Use Date()
Благодаря много.