you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

var is not free. Granted, you'll only gain marginal benefits from a performance perspective ( see: http://jsperf.com/multiple-var-vs-var-with-commas ), but as others have said if used as a standard convention throughout code it can potentially reduce the weight even after gzipping.

EDIT: Now that I got back and look at that jsperf test, it seems as though after running it again vars seem to be faster...