I am a bit of new to Javascript and I had a bit of confusion. Now for a Javascript object as the one below:
var obj = {
value:null
};
obj[value] = 2;
The above code would give me an error at line 2.
But if replace it as below
obj.value = 2;
it would work. Can some one tell me the issue behind why this happens.