We're a place where coders share, stay up-to-date and grow their careers.
Oh, and also the result would in fact be "[object Object]". The quotes are part of the serialized result (since it needs to be valid JSON).
"[object Object]"
That sounds... useful? 🙈
I mean, the specification is that the object gets converted to a string. About the actual content of the string, the OP said nothing 😝
Oh, and also the result would in fact be
"[object Object]"
. The quotes are part of the serialized result (since it needs to be valid JSON).I mean, the specification is that the object gets converted to a string. About the actual content of the string, the OP said nothing 😝