Periodic Table Cipher Javascript