irScript variables are declared using the var keyword; as an implicitly-typed language, irScript does not allow declaration using a static type.
Declarations are often combined with value assignments, but this is not required. Solitary declarations implicitly assign the value null to the declared identifier.
Some examples:
var x;
var isNull = x == null; // isNull == true
var y = null, a, b = [];
isNull = y == null; // isNull == true
isNull = a == null; // isNull == true
isNull = b == null; // isNull = false
var z = 'Fred';
Comments
0 comments
Please sign in to leave a comment.