January 2020
Intermediate to advanced
548 pages
13h 36m
English
Function expressions and arrow functions are the only function definition styles that are, technically, expressions. As we have seen, this quality makes them useful when we need to pass them as values to other functions without having to go through the process of assignment.
As we mentioned previously, a function without an assignment, and thus without a reference to its value, is typically called an anonymous function and will look like this:
(function() { // I am an anonymous function})
The idea of an anonymous function is extended further by the concept of an Immediately Invoked Function Expression (IIFE). An IIFE is just a regular anonymous function that is invoked immediately, like so:
(function() ...
Read now
Unlock full access