public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13
part1 = 'abcdefghijklm '
part2 = 'nopqrstuvwxyz.'
 
convert = (text) ->
output = ""
for i in [0...text.length]
index = part1.indexOf text.charAt(i)
if index isnt -1 then output += part2.charAt index else
index = part2.indexOf(text.charAt(i))
output += part1.charAt index
output
 
console.log convert("hi how are you")

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.