-
Notifications
You must be signed in to change notification settings - Fork 22.9k
Closed
Labels
Content:JSJavaScript docsJavaScript docs
Description
MDN URL
What specific section or headline is this issue about?
"What Went Wrong?" and "Examples"
What information was incorrect, unhelpful, or incomplete?
The documentation still uses var keyword while the code examples are updated with const keyword
What did you expect to see?
const and let instead of var
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
I can update it if needed but I wasn't sure if:
varshould be changed with justconstvarshould be changed withconstandlet
If it's is the second choice, then:
- Should
letbe added to code examples too?
Lastly, when testing the code block via the Firefox developer console, syntax error changed to:
const foo = 'Tom's bar';
// Uncaught SyntaxError: unexpected token: identifier[learn more] takes to this page but there is also a page provided for Unexpected Token error
MDN metadata
Page report details
- Folder:
en-us/web/javascript/reference/errors/missing_semicolon_before_statement - MDN URL: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Missing_semicolon_before_statement
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/javascript/reference/errors/missing_semicolon_before_statement/index.md
- Last commit: b260451
- Document last modified: 2022-07-11T12:35:38.000Z
Metadata
Metadata
Assignees
Labels
Content:JSJavaScript docsJavaScript docs