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);
function Multiple(func, n) {
Comments
Post a Comment