Yes, you can use the following:
$gameMap.event(eventID)._direction
where eventID is the ID of the event.
For example, you can make an event, then give it these event commands:
Code:
◆Control Variables: variableID = $gameMap.event(eventID)._direction
◆Text:None, Window, Bottom
: :Direction: \V[variableID]
where variableID is storing the direction value, and eventID is the event being checked. If the event running this command and the eventID are the same (and if the Direction Fix is off), then the event will create a text window every time you interact with it, stating its direction. To know which direction is which, you can look at your number keypad on your computer: 8 is up (north), 6 is right (east), 2 is down (south), and 4 is left (west). You can then use the value of the variable to make something happen in your game.
Alternatively, for those who don't need javascript, you can just use a Conditional Branch in your event command to check which direction a given event is facing. This is easier for most cases of eventing.