JS
Callback functions
Call back functions are those function which is sending to another function as pointer parameter which will be invoking from other function whenever is required.
Here is a simple example for understanding callback functionality
function Calc(x,y,callback) {
y=x+y;
callback(y)
}
Calc(10,20,function(x){
console.log("result is "+x);
});
Callback functions
Call back functions are those function which is sending to another function as pointer parameter which will be invoking from other function whenever is required.
Here is a simple example for understanding callback functionality
function Calc(x,y,callback) {
y=x+y;
callback(y)
}
Calc(10,20,function(x){
console.log("result is "+x);
});
Comments
Post a Comment