Closed
Bug 1186432
Opened 9 years ago
Closed 9 years ago
Reserved keyword `default`'s hyperlink points to `switch` page
Categories
(Developer Documentation Graveyard :: JavaScript, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: collinwu, Unassigned)
Details
What did you do?
================
1. Went to: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar
2. Clicked on the `default` keyword reserved in ES6
3. Links to `switch` page.
What happened?
==============
Wanted to learn more about the reserved keywords such as export, default, class, and extends so I hopped on to MDN.
When I got to the lexical grammar page here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar
Then proceeded to click on the `default` hyperlink, but I was redirected to the `switch` keyword page.
What should have happened?
==========================
Should redirect to the keyword `default` page.
However, I also noticed that `default` might not have a page? I don't see it mentioned anywhere in the side bar where all the other keywords are listed.
If that page doesn't exist, perhaps a tooltip indicating that it's a work in progress?
Is there anything else we should know?
======================================
Summary: Reversed keyword `default`'s hyperlink points to `switch` page → Reserved keyword `default`'s hyperlink points to `switch` page
Comment 1•9 years ago
|
||
I think this is a doc bug?
Component: General → JavaScript
Product: Mozilla Developer Network → Developer Documentation
Comment 2•9 years ago
|
||
In the past `default` only appeared in switch statements. Now that there are ES2015 modules, it can also be used with `export`.
I am not sure if we need a dedicated page that explains both uses of the `default` keyword, or if the `switch` and the `export` pages are enough.
Whiteboard: [specification][type:bug]
Comment 3•9 years ago
|
||
Updated https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Reserved_keywords_as_of_ECMAScript_6
Added https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default
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
•