Sorry, I have to be the style nazi here :-). I really don't like multiple variables declared with a single var at the top of the function. I won't complain if you insist you like this style better, but I find the one var per variable approach much easier to refactor (and if I ever have to touch this code, I will refactor it to use multiple var statements, count on it :-). Also, having the declaration at the top of the function is debatable (I know it's supposed to be less error prone because of block scope issues), but I just prefer to have the declarations close to the site of usage.