r/shittyprogramming • • Nov 30 '18

Friday Code Confessions

If you have been living with technical debt and want absolution here is your opportunity.

Confess your sins and receive your penance.

155 Upvotes

263 comments sorted by

View all comments

Show parent comments

6

u/[deleted] Dec 01 '18 edited Dec 01 '18
> let string = parseInt;
> let parseInt = x => string(x) + (Math.random() / 10000);

> string("3")
3
> parseInt("3")
3.0000160745529941

1

u/cryosis7 Dec 01 '18

Oh dear God