September 2024
Beginner to intermediate
985 pages
35h 37m
English
Functions are also objects in JavaScript. This isn’t self-evident and not true for all programming languages (not for Java, for example). Functions can therefore be used like "normal" variables as arguments or as return values of other functions. Also, like other objects, functions have methods that can be called on corresponding function objects.
Functions can be used as arguments to another function in JavaScript. A simple example of this is shown in Listing 4.157. It defines a function1() function that expects another function as its first parameter and calls it. If you want to pass another function to this function, you have several options. On the one hand, you ...
Read now
Unlock full access