JS exercise for simple message encryption