Closed
Bug 649090
Opened 13 years ago
Closed 9 years ago
Function destructuring parameters aren't documented.
Categories
(Developer Documentation Graveyard :: JavaScript, defect)
Developer Documentation Graveyard
JavaScript
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jimb, Assigned: fs)
References
()
Details
(Whiteboard: u=webdev p=0 c=JavaScript)
The developer.mozilla.org documentation for function definitions should document destructuring arguments: js> function f(a, [b, c], {d, e:f}) { print(uneval([a,b,c,d,f])); } js> f(1,[2,3],{d:4, e:5, x:9}) [1, 2, 3, 4, 5] js>
Reporter | ||
Comment 1•13 years ago
|
||
Not sure I filed this in the right place; Sheppy, can you fix this if I screwed it up?
Comment 2•13 years ago
|
||
You got it right.
Reporter | ||
Updated•13 years ago
|
Summary: Function destrucuring parameters aren't documented. → Function destructuring parameters aren't documented.
Updated•12 years ago
|
Component: Documentation Requests → Documentation
Updated•12 years ago
|
Component: Documentation → General
Product: Mozilla Developer Network → Developer Documentation
Updated•11 years ago
|
Assignee: nobody → bruant.d
Whiteboard: u=webdev p=0
Updated•11 years ago
|
Component: General → JavaScript
Updated•11 years ago
|
OS: Linux → All
Hardware: x86_64 → All
Whiteboard: u=webdev p=0 → u=webdev p=0 c=JavaScript
Assignee | ||
Comment 3•10 years ago
|
||
Just as a note for myself: The function statement page still needs clean-up and needs to mention destructuring params ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function) but destructuring in general is documented here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment. Function example see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Pulling_fields_from_objects_passed_as_function_parameter
Assignee: bruant.d → fscholz
Assignee | ||
Comment 4•10 years ago
|
||
Also note bug 1018628 (default values not yet working) when documenting this.
Assignee | ||
Comment 5•9 years ago
|
||
Mentioned here now https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Function_argument_defaults for defaults. And also https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Pulling_fields_from_objects_passed_as_function_parameter I guess we are good for now. The bug mentioned in comment 4 has dev-doc-needed on it, so it will be re-addressed at some point once this gets actually properly implemented.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•