F
function validateDate(year, month, day) {
const date = new Date(year, month, day)
return date.getFullYear() === year &&
date.getMonth() === month &&
date.getDate() === day
}
> validateDate(2020, 1, 31)
< false
> validateDate(2020, 1, 29)
< true
Size: a a a
F
function validateDate(year, month, day) {
const date = new Date(year, month, day)
return date.getFullYear() === year &&
date.getMonth() === month &&
date.getDate() === day
}
> validateDate(2020, 1, 31)
< false
> validateDate(2020, 1, 29)
< true
SW
TO
SW
['недоступен', 'скоро', 'доступен', 'недоступен', 'доступен',
‘вышел из продажи’, 'скоро', 'доступен', 'недоступен']
S
S
TO
S
S
TO
SW
SW
S
SW
S
RM
IS