I am aware that most common practice would be to put var a,b;
on the top, but I want to extract every possible character (after running on JS Uglify), and it seems they don't delete unnecessary var
initializing
I want to know if any of the following will cause problems and which is recommended
Case 1:
if(condition){
var a=-1;
var b="++";
}else{
var a=1;
var b="--";
}
Case 2:
if(condition){
var a=-1;
var b="++";
}else{
a=1;
b="--";
}
Case 3:
if(condition){
a=-1;
b="++";
}else{
var a=1;
var b="--";
}