Script variables bug or feature?

Just getting into WaveLab scripting and I’m very excited about the possibilities. I’m not a programmer/coder by trade though, so I have some pretty basic questions and after searching the forum I could not seem to find an answer to them…

Defined variables seem to still be valid even after deleting them, for instance:

var print = logWindow.printInfo;
print ("Hello World");

Yields “Hello World” in the Log window.

Then, deleting

var print = logWindow.printInfo;

and just running

print ("Hello World");

still yields “Hello World” in the Log Window.

Is this the desired behaviour?

Cheers,
Alex

I think, in this case, ‘print’ just happens to be an independant command.