Caesar Cipher implementation in JavaScript