obj = { [hello]: 0};
console.log(obj);
{ '': 0 }
Now, if I do
hello = “”
obj = { hello: 0};
console.log(obj);
it gives me
{ hello: 0 }
Why this array kind of bracket i.e. square bracket is required to actually compute the value of hello variable?