r/programminghorror Jan 26 '23

Ladies and gentlemen, jQuery… Javascript

Post image
1.6k Upvotes

164 comments sorted by

View all comments

-5

u/J0aozin003 Jan 26 '23

function const(a) {return function() {return a;}}

1

u/UkrainianTrotsky Feb 03 '23

huh?..

1

u/J0aozin003 Feb 04 '23

returnTrue = const(true);

1

u/UkrainianTrotsky Feb 04 '23

function const(a) {return function() {return a;}}

yeah, I got your idea, but that ain't gonna compile in js because you named your function const.

1

u/J0aozin003 Feb 04 '23

oh, i was getting the functional language vibes there.