InterviewSolution
Saved Bookmarks
| 1. |
What is a first class function in Javascript? |
|
Answer» When FUNCTIONS can be treated like any other variable then those functions are first-class functions. There are MANY other programming languages, for EXAMPLE, scala, Haskell, ETC which follow this including JS. Now because of this function can be PASSED as a param to another function(callback) or a function can return another function(higher-order function). map() and filter() are higher-order functions that are popularly used. |
|