8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8eeb98e commit bde09daCopy full SHA for bde09da
caesar/caesar.js
@@ -7,6 +7,9 @@ const caesar = function(string, shift) {
7
8
const codeSet = code => (code < 97 ? 65 : 97);
9
10
+# this function is just a fancy way of doing % so that it works with negative numbers
11
+# see this link for details:
12
+# https://stackoverflow.com/questions/4467539/javascript-modulo-gives-a-negative-result-for-negative-numbers
13
const mod = (n, m) => (n % m + m) % m;
14
15
const shiftChar = (char, shift) => {
0 commit comments