I think this will be my last thread for a while. Can you delete variables? Like with:
var blah = "hi";
delete blah;
Or something like that? Because otherwise with a complex enough script they could pile up, unless you used one array for every var.
I think this will be my last thread for a while. Can you delete variables? Like with:
var blah = "hi";
delete blah;
Or something like that? Because otherwise with a complex enough script they could pile up, unless you used one array for every var.
Properties can be deleted, at least on user-defined native objects. Properties of host objects (such as DOM objects) and most built-in properties cannot usually be deleted. Try to do so can lead to exceptions in IE (though that's a mistake, in my opinion: the operator should just return false).
Variables - properties defined using a var declaration - cannot be deleted.
Yes, they do, though that not usually a problem. Whenever a document is unloaded, script-defined data is discarded.Because otherwise with a complex enough script they could pile up, ...
Mike
Bookmarks