Historically it's been Lua, Javascript is a big change in the v2 beta.
In addition to automation you can do stuff like build custom menu extras, it's a handy tool.