I'm trying to figure out how I can check if a date is 24 hours or less from Now.
For example I have a date 11/2/2022 and several days has passed now. But I want to do a check for instance if my date is 11/11/2022 and if I check now since it's less than 24 hours will return true.
var mylast = 1667446218000;
var now = Date.now();
if(new Date(mylast) > Date.now() - 24 * 60 * 60 * 1000) {
console.log('true');
}