Converting a JS object to a string returns [object Object]
.
So I understand that [object Object]
is the default string representation of a JavaScript object, but I still don't understand what any of that syntax is. It just looks like a comma-less array to me. What do the brackets mean? Why is 'object' written inside of the brackets twice, and capitalized once?
In response to duplication concerns: Other questions about [object Object] only ask what it is. I understand that [object Object]
is the string representation of a JS object. I am asking specifically about the meaning of the syntax here.