Add number of hours to 24 hour clock
Tiny question ;)


As @Rotora mentioned, now is not a fantastic parameter name, it conveys that I need to only pass who late it is 'now', add is a verb, also not brilliant as parameter naming goes
addHours( -500 , -100 ) returns -0, is that what you want ?
You have 4 lines of comment, 3 lines of code, 1 blank line, perhaps you have to much comment ? Try to not need comments by working harder on parameter names.
Since adding is commutative ( order does not matter ), I would consider naming the function sumHours and name the parameters hours1 and hours2

function sumHours(hours1, hours2){
    var sum = (hours1 + hours2) % 24;
    return sum &lt; 0 ? 24 + sum : +sum;
};