function getSecondsBetween2Dates(startDate, endDate) {
const millisecondsInSecond = 1000;
return Math.round(Math.abs(endDate - startDate) / millisecondsInSecond);
}
console.log(getSecondsBetween2Dates(new Date(2022, 4, 08, 10, 04, 0), new Date(2022, 4, 08, 10, 05, 39)));
/*
run:
99
*/