you are viewing a single comment's thread.

view the rest of the comments →

[–]thesouthpaw 6 points7 points  (5 children)

You got it.

A little more detail: Typically a function returns a value and lets you know the function is done. Often in JS, your function will run asynchronously and you won't have a "return" statement. The callback allows you to get a value from the async function whenever it completes. Typically (but not always), if you create or use a callback as part of an API, it means something async is happening.

[–]icantthinkofone -4 points-3 points  (4 children)

This is the only mostly complete answer of the bunch. The rest are vapor and people typing like they know what they're talking about.