HEAD
Write a simple function that takes a Date as a parameter and returns a Boolean representing whether the date is today or not. Make sure that your function does not return a false positive by only checking the day.
No examples
function isToday(date) {
return new Date().toDateString() == date.toDateString()
}
Try it yourself - CodeWars
Write a simple function that takes a Date as a parameter and returns a Boolean representing whether the date is today or not. Make sure that your function does not return a false positive by only checking the day.
No examples
function isToday(date) {
return new Date().toDateString() == date.toDateString()
}
Try it yourself - CodeWars