2 Answered Questions for the topic Scope

06/06/19

Is window really global in Javascript?

Take this piece of Javascript in a browser: <script> console.log(window.someThing); var x = 12; function foo() { window.otherThing = x; } </script>Inside... more

05/05/19

Using global variables in a function?

How can I create or use a global variable in a function?If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.