What I am doing here is using the javascript subscript method to get a character to use in a switch statement.
I noticed the switch statement is always going to default so I stuck a logger.info snippet into the workflow and apparently substring is returning a number instead of a character.
Clearly I am doing something wrong.
Halp.