score:2

Accepted answer
this.onSubmit()
this.setState({ number: number-1 });

score:0

function sayHello(){
    console.log('Hello');
}

// Here we call sayHello();
sayHello();

function executeAnotherFunction(func){
    // We request the execution of the function passed.
    func();
}

// Here we pass a reference of sayHello to executeAnotherFunction
executeAnotherFunction(sayHello);

score:1

function first(){
   console.log('first');
}

function second(func) { // this get an parameter which is a function
   func(); // And here I call it 
}

second(first); // Here I pass the function's reference
               // And actually call the second with parentheses

score:1

window.setTimeout(someFunc, 1000);

Related Query

More Query from same tag