JavaScript Function returning function

preview_player
Показать описание
In previous lecture, we learnt that a function in JavaScript is a first class function i.e. it acts like any other value in JavaScript. We learned that a function can also be passed as a parameter to another function .

In this lecture, we will understand, how to return a functions from another function and how to use it.
Рекомендации по теме
Комментарии
Автор

Is it necessary to write the -function- return keyword in each case? I thought the function would be automatically returned.
(Sorry Error in question. I meant to ask why do you need the return keyword in each case, and not the 'function' keyword).

Martin