Discussion

Ask HN: JS, what is this called and how does it work?

(function(test){console.log(test)})(1)

I don't think this really exists in other languages outside of JS. Where you can send in a parameter this way. I understand that the test variable becomes what ever you pass in the tail end but how does this work? What is this called so I can better ask other JS developers?

4 points uptownhr 11 years ago 6 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton