It is also helpful to understand that a function's name is an identity known to the function, which means it is available to the internal logic of the function as a local reference and not a scoped reference.
The whole point of arrow functions is to reduce syntax and thereby provide easier to read code, which only the third of those three examples provide.
#NETSCAPE NAVIGATOR 2020 CODE#
So much of this discussion is nonsense though, because it doesn't make sense to arbitrarily complicate your code with unnecessary objects merely to provide your anonymous arrow functions with identity. The three exceptions are arrow functions, IIFE, and function arguments.
Function's require identity, aside from 3 exceptions, otherwise they throw an error. You can see in the first anonymous function example that an IIFE (immediately invoked function expression) is used. This does nothing to describe the function. And then generates the name of the object's property name. The first example assigns the arrow function to an object property. The following demonstrations take the prior examples and put the stack call into the arrow function bodies and wrap that in an arbitrary function for an additional line in the stack trace output. In order to prove the output of a stack trace you need logic that actually produces a stack trace.
The only way to arbitrarily generate a JavaScript stack trace without an error, in both modern browsers and Node, is the following code sample.