tern mode for javascript