1.

What is a callback function?

Answer»

A CALLBACK function is a function that is SUPPLIED as an INPUT to another function and then invoked inside the outer function to FINISH a ROUTINE or operation. Here is an example: 

function greeting(name) { alert('Hello ' + name);}function processUserInput(callback) { var name = prompt('Enter the name here.'); callback(name);}processUserInput(greeting);


Discussion

No Comment Found