- Create a class
CeasarCipher
and instances (e.g.cipher1
). - Create a property
alphabet
for the class that is an array of the standard letters of the alphabet. - Create a method
encode
for the class with a combination of array methods:pop
to remove the last letter of the alphabet string and return that letter, andunshift
to add the letter that's been returned to the front of the array. Put the array methods in a loop condition to repeatpop
andunshift
for as many times as you want to repeat pop and unshift methods. - Apply
encode
to ancipher1
(instance ofCeasarCipher
) to return modified alphabet.