Declaration and Assignment
JavaScript is a weakly-typed language. This means that variables are not assigned a type when they are declared. A variable can be assigned any value, and its type is determined by the value currently assigned. Consequently, a local variable does not need to be declared before it is used.
var variable_name = "Hello"; // -- recommended
message1 = "Hello"; // -- without “var” also works
var count = 100;
If a variable is used as a report-level variable, it must be declared using the 'var' keyword.
// Place declaration in the onLoad handler:
var pageTotal = 0;
After the variable is declared, it can be used everywhere as a shared report instance variable.
| << Comments and Names | © 1996-2013 InetSoft Technology Corporation (v11.5) | Object Types and Scopes >> |