Skip to content

Instantly share code, notes, and snippets.

View mohamedabusrea's full-sized avatar

Mohamed Abusrea mohamedabusrea

View GitHub Profile
@EvanHahn
EvanHahn / gist:2587465
Last active October 9, 2023 01:26
Caesar shift in JavaScript
/*
JavaScript Caesar shift
by Evan Hahn (evanhahn.com)
"Encrypt" like this:
caesarShift('Attack at dawn!', 12); // Returns "Mffmow mf pmiz!"
And "decrypt" like this: