Closed
Bug 1263984
Opened 9 years ago
Closed 9 years ago
Need to note that shorthand method definitions create named functions.
Categories
(Developer Documentation Graveyard :: JavaScript, defect, P5)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: qed_2000, Unassigned)
References
()
Details
:: Developer Documentation Request
Request Type: Correction
Gecko Version: unspecified
Technical Contact:
:: Details
The documentation for Method Definitions in ES2015 implies that the shorthand version is the same as the long form. I.e.
```javascript
var obj = {
method1: function () {},
method2() {}
};
```
In fact, the shorthand method creates a named rather than anonymous function. There should be some note indicating this.
Thanks!
I added the note in the revision 1041892 (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions$revision/1041892). I hope this helps.
Thanks for reporting!
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•