1var numberOfRounds = function (loginTime, logoutTime) {2const start = toMins(loginTime);3const end = toMins(logoutTime);45let roundStart = Math.ceil(start / 15);6let roundEnd = Math.floor(end / 15);78if (start < end) {9return Math.max(0, roundEnd - roundStart);10} else {11roundEnd += 96;12return roundEnd - roundStart;13}1415function toMins(timeStr) {16const [hh, mm] = timeStr.split(":");1718let totMins = 0;1920totMins += parseInt(hh) * 60;21totMins += parseInt(mm);2223return totMins;24}25};