Higher order Functions

 function Multiple(func, n) {

  for (let i = 1; i <= n; i++) {
    func();
  }
}
let greet = function () {
  console.log("Helloo");
};
Multiple(greet, 5);
Multiple(function () {console.log("Namaste");}, 100);


Comments

Popular posts from this blog

Callback Hell

TODO list with DOM

Refactoring callback hell code