Multiple var statements in JavaScript, not superfluous

Posted: May 08, 2012 Comments

Ben Alman » Multiple var statements in JavaScript, not superfluous.

I’ve got admit here that until recently I somehow fell victim to the thought that seeing multiple var statements in a piece of JavaScript indicated a lack of overall quality. I have absolutely no idea how that happened or how I came to that conclusion but I did. As I’ve been getting back to basics with JavaScript and reading library-less books and documentation, the awesomeness of JavaScript is becoming more apparent every day.

Unfortunately it seems like there’s quite a bit of zealotry and opinion littered throughout writings about JavaScript. We all know it’s not limited to JavaScript as a language but programming in and of itself. It’s important to keep in mind that you should be cognizant of what you’re reading and able to decipher conveyed opinion over founded fact.

Get my newsletter

Receive periodic updates right in the mail!
  • This field is for validation purposes and should be left unchanged.

Leave a Reply

Your email address will not be published.