r/ProgrammerHumor • • Mar 20 '24

Meme areJSDevsActuallySane

Post image
14k Upvotes

554 comments sorted by

View all comments

Show parent comment

8

u/Antrikshy Mar 20 '24

I guess so.

But since RegExp is a class, and not a primitive, it doesn't seem impossible for its constructor to check something like typeof param === "string".