-
Notifications
You must be signed in to change notification settings - Fork 4k
Update Map usage explanation in article.md #3903
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
Conversation
Clarify the correct usage of Map methods and explain the implications of using map[key].
CLA assistant check
All committers have signed the CLA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the documentation about Map usage by clarifying what happens when using bracket notation (map[key]) instead of the proper Map methods. The update replaces a brief warning with a detailed explanation and concrete code example.
Key changes:
- Expanded explanation of why
map[key]should be avoided, clarifying that it adds properties to the Map object itself rather than storing data in the Map collection - Added a practical code example demonstrating the difference between bracket notation and proper Map methods
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Accepted the changes from the review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Clarify the correct usage of Map methods and explain the implications of using map[key].