Hacker News new | ask | show | jobs
by luuuzeta 1308 days ago
I've your blog bookmarked and I'll be reading it this weekend haha. Thanks for putting it together!

>Callbacks are not asynchronous by nature, but can be used for asynchronous purposes.

Glad you mention this because some people make it since like callbacks are a de-facto asynchronous-based concept. Callbacks are simply anonymous functions or lambdas that you pass to asynchronous functions so you can work with the produced values. Correct me if I'm wrong though.

2 comments

Thanks! Yeah, the callback thing tripped me up when I was learning because so many articles just glossed over the whole thing so I had to dig a little deeper and play around to understand it more.
More accurately -

Callbacks are anonymous functions [or references to named functions] that you pass to asynchronous [or synchronous] functions so you can work with the produced values [or do anything else]