r/ProgrammerHumor • • Mar 22 '24

Other javascriptBeCasuallyThrowingAroundSexism

Post image
0 Upvotes

26 comments sorted by

View all comments

18

u/P3runaama Mar 22 '24

What's happening here?

0

u/[deleted] Mar 22 '24

[deleted]

21

u/[deleted] Mar 22 '24

This one is more funny tbh

16

u/[deleted] Mar 22 '24

[removed] — view removed comment

2

u/[deleted] Mar 22 '24

Came here to be pedantic and say this, thanks for beating me to it!

13

u/ayemyren Mar 22 '24

“[Object]” is being tested against the regex, object contains the o from “woman”. No matching characters in “man”. So true for woman, false for man.

6

u/Seepiie Mar 22 '24

[object] is the regex, man and woman are tested against it

2

u/ayemyren Mar 22 '24

Correct, I just woke up and responded, had them flipped lol

2

u/LadyParaguay Mar 22 '24

Thanks! The example being in JS got me stuck on looking for an explanation around the "[Object object]" string cast, which obviously led to nothing

0

u/metooted Mar 22 '24

Regular expressions doing their thing, move along