Skip to content

Add examples for pure functions and destructuring defaults #704

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mohandand
Copy link

This PR adds two new best-practice examples to the guide:

  1. Pure Functions vs. Side Effects (in the Functions section)

    • Demonstrates the importance of avoiding side effects
    • Includes good vs. bad examples with clear reasoning
  2. Destructuring Defaults & Nested Destructuring (in the Objects and Data Structures section)

    • Shows how to provide safe defaults and avoid runtime errors
    • Includes clean parameter handling with modern syntax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant