send function into another function as callback jquery code example
Example: how to pass callback function in javascript
function functionOne(x) { alert(x); }
function functionTwo(var1, callback) {
callback(var1);
}
functionTwo(2, functionOne);