A Little JavaScript Formatting
So I am a stickler when it comes to code formatting. If I see this:
2 function demo(){
3 var hello = "world";
4 var someNumber = 132;
5 var anotherString = "some string value";
6 }
7</script>
I cringe and tell you to clean up your code. Instead of doing that you can do this:
2 function demo(){
3 var hello = "world",
4 someNumber = 132,
5 anotherString = "some string value";
6 }
7</script>
Also, in development putting them on new lines is great for readability. Coldfusion Builder by default wants to format them to one line.
In fact, I've decided that I'd rather make my code as readable as possible and not worry about white space, etc, and now prefer to use multiple vars. The keyword usually lights up in IDEs making it easy to see your var scoping.
Then when you publish to prod just run your build tool (like in RequireJS or HTML5BP, etc) and it automatically removes your extra vars and reduces white space to make it as tiny as possible. Win.
http://benalman.com/news/2012/05/multiple-var-stat...