You're going to implement a simple Rail Fence Cipher
Write a ruby script that takes a string as an argument and encodes it using a Rail Fence Cipher with 3 rails. You can assume no spaces and all input is valid.
Example input/output:
[ck@arch rail_fence_cipher]$ ruby rfc.rb WEAREDISCOVEREDFLEEATONCE
WECRLTEERDSOEEFEAOCAIVDEN
- Convert your script to NodeJS
- Write an encode function were you can specify the number of rails you want
- Write a decode function