Objects in JavaScript can only have a String
type or a Symbol
type as a property name.
In this task, all properties inside square brackets are automatically converted to the String
type.
The strings z[a] = 3;
and z[b] = 4;
added a property named object Object
to the object, because the method Object.prototype.toString()
was automatically called on these objects, when converting to string.