Closed Bug 649090 Opened 13 years ago Closed 9 years ago

Function destructuring parameters aren't documented.

Categories

(Developer Documentation Graveyard :: JavaScript, defect)

defect
Not set
normal

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>
Not sure I filed this in the right place; Sheppy, can you fix this if I screwed it up?
You got it right.
Summary: Function destrucuring parameters aren't documented. → Function destructuring parameters aren't documented.
Component: Documentation Requests → Documentation
Component: Documentation → General
Product: Mozilla Developer Network → Developer Documentation
Assignee: nobody → bruant.d
Whiteboard: u=webdev p=0
Component: General → JavaScript
OS: Linux → All
Hardware: x86_64 → All
Whiteboard: u=webdev p=0 → u=webdev p=0 c=JavaScript
Also note bug 1018628 (default values not yet working) when documenting this.
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.