clean-code-javascript
clean-code-javascript copied to clipboard
Add examples for pure functions and destructuring defaults
This PR adds two new best-practice examples to the guide:
-
Pure Functions vs. Side Effects (in the Functions section)
- Demonstrates the importance of avoiding side effects
- Includes good vs. bad examples with clear reasoning
-
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