Technically, the % operator in JS is _not_ the modulo operator.
It's a different operator that returns negative values by design.
So it _does_ work with negative numbers as intended,
it's just not the operator that is needed for the caesar shift.
Therefore, mod does not "make % work with negative numbers",
it just uses % to implement the modulo operator.
The previous comment might suggest that there is a bug that gets fixed,
the new comment hopefully avoids that source of possible confusion.
Using shift as a parameter name might be confusing,
since it is a verb and therefore not a good variable name on its own.
Changing it to shiftValue should clear things up and also makes it
possible to shorten the name of the shiftChar function to just shift,
which leads to a cleaner signature: shift(char, shiftValue)