Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

higher order function in javascript

//higher order function is just a function that take other function as a parameter
//example forEach

function repeater(fn){
fn(); fn(); fn();
}

function sayHello(){
console.log("Hello There!")
}
repeater(sayHello);//at console Hello There 3 times._
//repeater is higher order function that take sayHello as function parameter.
Source by www.google.com #
 
PREVIOUS NEXT
Tagged: #higher #order #function #javascript
ADD COMMENT
Topic
Name
3+6 =