I have a global variable in JavaScript (actually a window
property, but I don\'t think it matters) which was already populated by a previous script but I don\'t
The delete operator removes a property from an object.
delete object.property
delete object['property']
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete
According to the question you need one of followings
delete some_var;
delete window.some_var;
delete window['some_var'];