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

ES6 Modules: Clarified string declaration in import statements #28051

Merged
merged 3 commits into from
May 25, 2024

Conversation

aceus0
Copy link
Contributor

@aceus0 aceus0 commented May 25, 2024

Because

Added a note to inform users to only use quote(') or double quote(") for import statements. If you try to call and import statement using a template literal (`) it will not work. In the MDN tutorial on strings they mention pick one string declaration method and stick to it. This may cause learners to try calling import statements with template literals and wondering why something is wrong.

This PR

added a comment in the import statement code block mentioning to only use quote(') or double quote(") for import statements

Issue

Closes #28049

Additional Information

first pr, go easy on me

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

@github-actions github-actions bot added the Content: JavaScript Involves the JavaScript course label May 25, 2024
@@ -83,6 +83,7 @@ export { functionOne };

```javascript
// another JS file
// Note: Only use single quote (') or double quote (") for import statements
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly could start with "You can only use..." To make it explicit it's not just "you should as best practice" but actually "you cannot use template strings for the import"?
Only a small nit but I think it'll be clearer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaoShizhong just made the change. Let me know what you think.

Copy link
Contributor

@MaoShizhong MaoShizhong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@MaoShizhong MaoShizhong merged commit e41f515 into TheOdinProject:main May 25, 2024
@aceus0 aceus0 deleted the es6_tweak branch May 25, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: JavaScript Involves the JavaScript course
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JavaScript Course: Adding note about template literals on import statements
2 participants