javascript identifier resolution