r/ProgrammerHumor • • Mar 20 '24

Meme areJSDevsActuallySane

Post image
14k Upvotes

554 comments sorted by

View all comments

1

u/TuVeuxBaiser Mar 21 '24

Wait, so every time {} is used it brings in what would be an object except its always just a string that says object?

I mean, this seems insane... what am I missing? What is the use case for a string that says object Object that is in no way an object?

1

u/reddit_is_meh Mar 21 '24

This is just the default object to string cast behaviour of an object in JS, it returns The string [Object object]

It's not something you ever really do or use