getVariableValueAsInteger
Treat a variable as an integer in JavaScript style. Note this function can only handle integer and boolean currently.
Return
the integer value
Parameters
var
the variable to get value from
Throws
the data type of var
is neither integer nor boolean.