How to set multiple variables at once in JavaScript?
From a very good book called JavaScript Patterns:


  Using a single var statement at the top of your functions is a useful pattern to adopt.  It has the following benefits:
  
  
  Provides a single place to look for all the local variables needed by the function
  Prevents logical errors when a variable is used before it's defined
  Helps you remember to declare variables and therefore minimize globals
  Is less code (to type and to transfer over the wire)
  


The author also recommends initializing the variables when you declare them when possible.