server.js
// If time exists then it must be an integer.
If time exists then it must be an integer.
If time exists then it must be an integer .
function parseTime(timeString) {
    if (typeof timeString === 'undefined') {
        return;
    }
    const time = Number(timeString);
    if (Number.isInteger(time)) {
        return time;
    } else {
        return null;
    }
}
function parseTime ( timeString ) { if ( typeof timeString === 'undefined' ) { return ; } const time = Number ( timeString ) ; if ( Number . isInteger ( time ) ) { return time ; } else { return null ; } }
If time exists then it must be an integer.
If time exists then it must be an integer .