The callback function is important to us, Its works as an argument passing in the function.
Its something required asynchronous function called and think, you need to wait for that response and want to process that response ahead that could be achievable by callback.
Example :
function a(cb){
var a = 10;
var b= 10;
setTimeout(function(){cb(c)},2000);
c = a+b;
}
a(result=>{
if(result){
console.log(result)
}
})