Alert according to which arrow key was pressed

Checks which charCode is in x, and alerts according to which charCode number it is (i.e. which key was pressed).
This example focuses on arrow keys.