We don't use the '$' naming scheme for variables in Studio, and new code should follow the conventions of the file it is in.

More importantly, vars should all be declared at the top of the file. This is a JSLint violation and the Studio team runs JSLint to ensure that they don't creep in. Hopefully we will have this run as part of the build process before too long.

Here's the explanation as to why the variable should be declared at the start of the function:

http://jslinterrors.com/move-var-declarations-to-the-top-of-the-function/