r/ProgrammerHumor • • Mar 20 '24

Meme areJSDevsActuallySane

Post image
14k Upvotes

554 comments sorted by

View all comments

Show parent comment

10

u/Cley_Faye Mar 20 '24

The middle step is wrong. {} is directly converted to a string with {}.toString(), which indeed results in [object Object]. Writing new RegExp([object Object]) is incorrect.

13

u/Lumethys Mar 20 '24

It is like a thought flow, not a compiling step. Or else I would just write the whole OP post back