Is there any way to check if a JavaScript variable has been set in the global scope in your code? Here's the use case:
var pizza;
pizza.isGlobalScoped()
Is there some method/conditional or any other way to figure out if a variable is not block scoped or within a closure?
In the browser you can do
If ( "pizza" in window)...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With