Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to pass callback function in javascript

function functionOne(x) { alert(x); }

function functionTwo(var1, callback) {
    callback(var1);		
}

functionTwo(2, functionOne);
 
PREVIOUS NEXT
Tagged: #pass #callback #function #javascript
ADD COMMENT
Topic
Name
4+5 =