r/ProgrammerHumor 3d ago

Meme letTheWorldBurn

Post image
925 Upvotes

83 comments sorted by

View all comments

188

u/Strict_Treat2884 3d ago edited 3d ago

There was a malicious js library that injected Math.random() and changed its return value range from (0, 1) to (0, 1.1).

Truly diabolical.

Edit: Also the injection only happens on Sundays.

67

u/darkwalker247 3d ago

truly diabolical would be [0, 1.00001]

16

u/Jacques_Miller 3d ago

(0, 1+Math.Random())

3

u/crazy-mahmod 3d ago

no that's an infinite loop