caesar cipher algorithm js code example
Example: caesar cipher javascript code
const caesar = (text, shift) => {
return String.fromCharCode(
...text.split('').map(char => ((char.charCodeAt() - 97 + shift) % 26) + 97),
);
};
const caesar = (text, shift) => {
return String.fromCharCode(
...text.split('').map(char => ((char.charCodeAt() - 97 + shift) % 26) + 97),
);
};