Update caesarCipher.md
This commit is contained in:
committed by
GitHub
parent
b8f032cc28
commit
c6cc0cb2b7
@ -7,7 +7,7 @@ Encrypts or decrypts a given string using the Caesar cipher.
|
||||
|
||||
- Use the modulo (`%`) operator and the ternary operator (`?`) to calculate the correct encryption/decryption key.
|
||||
- Use the spread operator (`...`) and `Array.prototype.map()` to iterate over the letters of the given string.
|
||||
- Use `String.prototype.charCodeAt()` and `String.fromCharCode()` to convert each letter appropriately, ignoring special characters, spaces et.c
|
||||
- Use `String.prototype.charCodeAt()` and `String.fromCharCode()` to convert each letter appropriately, ignoring special characters, spaces etc.
|
||||
- Use `Array.prototype.join()` to combine all the letters into a string.
|
||||
- Pass `true` to the last parameter, `decrypt`, to decrypt an encrypted string.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user