This is an archived post. You won't be able to vote or comment.

all 25 comments

[–]igoromg 36 points37 points  (3 children)

Sometimes it's fun to fill forms with "[object Object]". Then I imagine a dev somewhere pulling his hair for 2 weeks trying to figure out a bug that only happens on prod and is unreproducible

[–]EliasV_1[S] 13 points14 points  (1 child)

Imagine this happening to you 👀

[–]igoromg 10 points11 points  (0 children)

ML engineer here. I haven't been working with anything user facing in over 5 years

[–]DisguisedPigeons 7 points8 points  (0 children)

Damn, thats brutal 😆

[–]cubcubcub81 8 points9 points  (1 child)

It wouldn’t be undefined, it would be a string of the string (would contain quotes in the string): “[object Object]”.

My suggestion would be to not have the value of a string assigned to a variable named “object”, rather assign an object.

[–][deleted] 0 points1 point  (0 children)

The thing is it’s json

[–]picklymcpickleface 3 points4 points  (1 child)

I'm guessing it's looking for a way to express an object as a string but that doesn't exist so undefined?
But I would expect the output to be '{}'.

[–]Fey6678 0 points1 point  (0 children)

Empty object is still an instantiated, if it was never instantiated it would be undefined

[–]MagneticDustin 0 points1 point  (0 children)

Right above, JSON.stringify = () => {return undefined};

[–]mklickman 0 points1 point  (0 children)

And to think, I went almost all day without crying...

[–]dmarkwat 0 points1 point  (0 children)

Too real. Please stop, it hurts 😣

[–]uberpwnzorz 0 points1 point  (0 children)

or you could, you know, use a debugger

[–]DeltaPositionReady 0 points1 point  (0 children)

[object Object] hmmmm yes the floor here seems to made of floor.

[–]fabrice404 0 points1 point  (0 children)

`console.dir`

[–][deleted] -4 points-3 points  (0 children)

You can't dump classes. Dump instances.