A
A
Alexander Kolobov2010-09-15 20:12:30
JavaScript
Alexander Kolobov, 2010-09-15 20:12:30

Where are local variables stored in javascript?

I know that when a global variable is created in javascript, it becomes a property of the window object and can be accessed through it accordingly: window.var. I just can't figure out what properties become local variables declared in the body of the function? Where are they stored and how can they be accessed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
TravisBickle, 2010-09-15
@TravisBickle

Of course, they are written in a single hash of this scope. However, as far as I know, this area is not represented as an accessible object.

S
sedictor, 2010-09-15
@sedictor

In a ScopeChain that cannot be accessed.
Try FireBug to pause script execution - you will see the variables

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question