It can't, that's why you can simulate private state through closures in JS. You can pass it's (current) value to the callback (or in the case of objects, a reference) but not the variable; which means, the callback doesn't "notice" when the value of a changes; all it has is the value given. And you can not change the value of the variable from the callback. If you explain what exactly you are trying to achieve, we can help you work around the problems.
achanges; all it has is the value given. And you can not change the value of the variable from the callback. If you explain what exactly you are trying to achieve, we can help you work around the problems.