langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
|
|
@ -1,10 +0,0 @@
|
|||
cipher = (msg, rot) ->
|
||||
msg.replace /([a-z|A-Z])/g, ($1) ->
|
||||
c = $1.charCodeAt(0)
|
||||
String.fromCharCode \
|
||||
if c >= 97
|
||||
then (c + rot + 26 - 97) % 26 + 97
|
||||
else (c + rot + 26 - 65) % 26 + 65
|
||||
|
||||
console.log cipher "Hello World", 2
|
||||
console.log cipher "azAz %^&*()", 3
|
||||
Loading…
Add table
Add a link
Reference in a new issue