7.1 contains this statement:
Function declarations are named, so they're easier to identify in call stacks.
Anonymous function expressions assigned to a binding are also named, per ES6 semantics (1.e.iii). That is, the "bad" example const foo = function () { };
is the same as const foo = function foo() { };
, which is equivalent to the "good" example function foo() { }
in that respect.
Should the statement be qualified that it's only a distinction for ES5 and below ?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4