-
Notifications
You must be signed in to change notification settings - Fork 26.8k
Closed
Description
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 ?