Try to search your question here, if you can't find : Ask Any Question Now ?

How to unset a JavaScript variable?

HomeCategory: stackoverflowHow to unset a JavaScript variable?
craig asked 2 weeks ago

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 want another script that will run later to see its value or that it was even defined.

I’ve put some_var = undefined and it works for the purpose of testing typeof some_var == "undefined" but I really do not think it’s the right way to go about it.

What do you think?

1 Answers
Best Answer
naveen answered 2 weeks ago
Your Answer

18 + 10 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com