I am struggling with a Javascript question for some time now and I was not able to find an explanation on the web. I guess it is because I do not enter the right keywords wh
Object properties and local variables are largely unrelated:
var n declares a variable that is scoped to the function it's in (i.e. it is not visible outside of that function (except via closure)).
var n
addn['n'] adds a property named n to addn and is equivalent to addn.n
addn['n']
n
addn
addn.n