Function in Javascript

Higher Order Functions not clear basically the hof2.html file

Hi @sundriyalabhishek1330_b3a2c60b440c75c8,
Please the code or git link here so that I can guide you better.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

Lecture05/js-basics/hof2.js

Screenshot (5)

This is the code

Hi @sundriyalabhishek1330_b3a2c60b440c75c8,
In here a function createGreeter is defined that accepts parameter greeting and returns a function that is defined in its function body itself named greet that inturn accepts name as an argument and logs it with the greeting and also calls the function name. To conclude createGreeter is a higher order function because it returns another function which in turn make a call to the name function.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.