Just opened a client\'s javascript file and the first lines are along the lines of this:
{
var s_account=\"blog\";
}
Which I don\'t get
The only logical reason to do something like this, in my mind, is as an organizational technique.
function banana(){
// private members
{
var foo = "foo",
bar = "bar",
baz = "baz";
function bux(){
console.log("bux");
}
}
// public members
this.fin = "fin";
this.fang = "fang";
this.foom = "foom";
this.shamalamadingdong = function(){
bux();
};
}
Also, most IDEs will allow you to collapse that "private members" block and get it out of your way.