quote:
Originally posted by Felu
If you assign a value to a variable inside a function but don't declare it, it becomes a global variable.
Exactly, but you already declared the variable outside a function, making it global. I thought all variables should be declared and you couldn't just go:
jscript code:
function one(){
myVar = 100;
}
function two(){
myVar += 100;
}
Debug.Trace(myVar);