direction bet js