Pros v Cons to use hidden var

Hi,

I would like to know which the best practice to declare global variable,

Option 1 : hidden var vTemperature = 0;

Option 2 : var vTemperature as number = 0;

Best regards,

Oriol

  • at the global level there'll be no practical difference with applying the hidden keyword, this is a keyword which applies at the class level, more in particular when you make use of inheritance.

    imho the best practice would be to not declare a global variable at all. personally I rarely use variables with that big of scope and declare the variables as close to where I need them, preferably I use local method variables, class variables where I must.