I was reading here on stack overflow that these are not equal. So what is the difference.
What happened is that in 2nd case value was assigned as the property of myObj. So if b='abc'; then myObj.abc was now available.
I had always thought same thing but []
version was used when name were weird ones.