JavaScript variables - new var altering original value -


It's been a while since I touched javascript, but something has struck me, just let me know You should know, but this is causing me a big headache for the last hours!

Scenario;

  Mop = {ales: [], pool: [], generated: work () {For (var i = 0; i  

This is a long lasting way to say that this variable has a problem with specifying. But I thought I would show the context.

In essence, affects Mop.show () at ARIDS Mop.pool , and Mop.oneAtime.p , even if the latter was assigned the Mop.pool value, and Mop.pool was not touched again. Mop.pool must be located.

I can hear laughing at this how easy it will be - but I can not understand that due to both the arrays are affected by hair () method! Scope, Closer, the way I bet, I tried everything I could think of ...


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -