Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strict mode article should reflect current ES6 instead of ES5 #1829

Closed
1 of 3 tasks
vwkd opened this issue Jan 30, 2020 · 2 comments
Closed
1 of 3 tasks

Strict mode article should reflect current ES6 instead of ES5 #1829

vwkd opened this issue Jan 30, 2020 · 2 comments
Labels
Content:JS JavaScript docs effort: medium This task is a medium effort. help wanted If you know something about this topic, we would love your help!

Comments

@vwkd
Copy link
Contributor

vwkd commented Jan 30, 2020

Request type

  • Please close this issue, I accidentally submitted it without adding any details
  • New documentation
  • Correction or update

Details

The Strict Mode article seems to not clearly reflect how strict mode works with the current version ES6. Many statements still refer to how strict mode worked with ES5 primarily. Now that ES6 is standard, refering to ES5 behavior primarily becomes just wrong.

For example, refer to this sentence about function definitions in block scope.

Second, strict mode prohibits function statements, not at the top level of a script or function

Prohibited in ES5, but allowed in ES6. Also the example that follows clearly only shows ES5 behavior. So in ES6 this statement is not true anymore, but the only thing there is is a small aside in the form of sentence

Note that function statements outside top level are permitted in ES2015.

The article should reflect primarily ES6 behavior, and only mention old ES5 behavior as an aside, instead of vice versa.

Just to preempt the question, why I create this issue instead of changing the wiki myself: Since I'm currently learning about strict mode, I feel not confident enough to change the wiki about a topic that I feel like I haven't understood yet. I hope somebody that feels more confident can look through the article and update it.

MDN URL: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode

@Elchi3 Elchi3 removed their assignment Jan 6, 2021
@chrisdavidmills chrisdavidmills transferred this issue from mdn/sprints Jan 27, 2021
@sideshowbarker sideshowbarker added the help wanted If you know something about this topic, we would love your help! label Jun 15, 2021
@github-actions github-actions bot added the idle label Nov 24, 2021
@Rumyra Rumyra added effort: medium This task is a medium effort. and removed 30 minute task labels Nov 29, 2021
MendyBerger pushed a commit to MendyBerger/content that referenced this issue Nov 30, 2021
…dn#1829)

* Add auto width to .example-container

* Removes inner container from example output

* Replace .example-container with .default-example
@teoli2003 teoli2003 reopened this May 29, 2022
@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label May 29, 2022
@sideshowbarker sideshowbarker removed the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label May 30, 2022
@Josh-Cena
Copy link
Member

Fixed by #14186 already

@teoli2003
Copy link
Member

Close per comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:JS JavaScript docs effort: medium This task is a medium effort. help wanted If you know something about this topic, we would love your help!
Projects
None yet
Development

No branches or pull requests

7 participants