You are viewing a single comment's thread. Return to all comments →
Javascript
const letter='abcdefghijklmnopqrstuvwxyz'; const arr=letter.split(''); let final=''" for(let i=1;i<=k;i++){ let shi=arr.shift(); arr.push(shi); } s.split('').forEach(val=>{ if(val.match(/[^a-zA-Z]/g)){ final+=val return } if(val.match(/[A-Z]/g)){ let index=letter.split('').indexOf(val.toLowerCase()); let value=arr.at(index).toUpperCase(); final+=value return } let index=letter.split('').indexOf(val); let value=arr.at(index) final+=value }) return final
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 →
Javascript