REST API with Express.js
Callback Example
  1. Copy below code to file callback_example.js and excute is.
    setTimeout(doSomething,2000);
    
    function doSomething(){
        console.log("Demonstrating the callbacks");
    }
    console.log("The application is started");
    
  2. Make the same example using anonymous function
  3. Make the same example using arrow function



Toggle Menu