i use uppercase to make more explicit the use of a constant
var directions = { UP : 0, RIGHT: 1, ... }
this.direction = directions.UP
other option can is:
var DIRECTIONS = { 'up' : 0, 'right': 1, ... }
this.direction = DIRECTIONS['up']
which allows you to translate your number back to it's original string.