This reference may be helpful in understanding how you can work with Date objects.
If you invoke the Date constructor without passing in any parameters, what date will be stored in the object that is returned?
What is an 'epoch'?
What is a 'Unix timestamp' (also known as 'epoch time')?
What is the actual date of the epoch for Unix timestamps?
What does the getTime() method of a date object return (refer to the link that was mentioned above, or find another reference on the Date object in JavaScript)?
If you are working with 2 date objects, how could you use the getTime() method to determine if one date is more recent than the other?
`${date1.getTime()>date2.getTime() ? date1.toDateString : date2.toDateString} is more recent.`
Otherwise, if you're going with the definition of recent that is closer to the present, i.e. yesterday is more recent than 100 years from now,
then you would want to create a date object representing today, then compare the two objects to that object the same way we did before,
except here, you would be wanting to find the smallest difference, like so:
//just example code
const recent = (date1, date2) => {
const today = new Date();
const diff1 = Math.abs(today.getTime() - date1.getTime());
const diff2 = Math.abs(today.getTime() - date2.getTime());
const diff = diff1 > diff2 ? date2 : date1;
return diff;
}