MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1bjjkm6/arejsdevsactuallysane/kvrtfam/
r/ProgrammerHumor • u/jarulsamy • Mar 20 '24
554 comments sorted by
View all comments
Show parent comment
10
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.
{}
{}.toString()
[object Object]
new RegExp([object Object])
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
13
It is like a thought flow, not a compiling step. Or else I would just write the whole OP post back
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]. Writingnew RegExp([object Object])is incorrect.