You are viewing a single comment's thread. Return to all comments →
js single line code solution:
const caesarCipher = (s, k) => (String.fromCodePoint(...[...s].map((char,idx,arr,currCodePoint)=>(currCodePoint = char.codePointAt(0),(currCodePoint<=90&&currCodePoint>=65)?(((currCodePoint + k)-65)%26+65):((currCodePoint<=122&&currCodePoint>=97)?(((currCodePoint + k)-97)%26+97):(currCodePoint))))));
Seems like cookies are disabled on this browser, please enable them to open this website
Caesar Cipher
You are viewing a single comment's thread. Return to all comments →
js single line code solution: