mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 08:16:50 +08:00
Updated Syntax
This commit is contained in:
@ -21,7 +21,7 @@ const getMonthDays = (monthNumber, year) => {
|
||||
if (the30DaysMonths.includes(monthNumber)) { return 30 }
|
||||
|
||||
// Check for Leap year
|
||||
if (((year % 400) === 0)||(((year % 100) != 0) && ((year % 4) === 0))) { return 29 }
|
||||
if (((year % 400) === 0) || (((year % 100) !== 0) && ((year % 4) === 0))) { return 29 }
|
||||
|
||||
return 28
|
||||
}
|
||||
|
Reference in New Issue
Block a user