Not sure if I'm wording this correctly but can local variables inside a sealed object pass information to global variables?
Asked
Active
Viewed 56 times
0
-
What do you mean by 'pass information'? Do you mean to ask if they can modify or set values to global variables? – Robbie Wxyz Sep 22 '13 at 01:07
-
Yes. lets say var hello = 2 is the global variable and there's a function within a sealed object. And inside the function is var hello = 3. Should it update the global variable to 3? – Kahless Sep 22 '13 at 01:12
-
correction. within the function is hello = 3 not var hello = 3. – Kahless Sep 22 '13 at 01:15
-
What's a "sealed object" ? You can easily write a piece of code that tests it! – Nir Alfasi Sep 22 '13 at 01:21
-
Sorry I'm still very new to this. This page will explain it better. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/seal – Kahless Sep 22 '13 at 01:32