News for hackers. Stuff that matters.
Re:Ask HN: What are the nice feature you need in a programmi... by peppery-idiot on Thursday November 21, 2024 @07:19AM (#42203595)
You can do a lot of the codeblock stuff with JavaScript's Function prototype (bind, apply, call):

const someBlock = function () { console.log(this.a + 2 + this.c); }

const myFunc = someBlock.bind({a: 1, c: 3})

myFunc(); // => 6

There are no comments on this comment yet.