Is just a function that executes after one other function that calls it, finishes?
Please I know (almost) nothing about programming, and I find it quite hard to find
Code like this
var result = db.query('select * from T'); //use result - Standard function
your software is doing nothing and you are just waiting for the database to respond. this somehow either blocks the entire process or implies multiple execution stacks. But a line of code like this
db.query('select * from T',function(result){
//use result - Callback function
});
allow the program to return to the event loop immediately.
In this execution, server makes that request and continue doing other things, when the request comes back(after millions of clock cycles), you can execute the callback, all you need is the pointer to the callback.