roberto-butti / some-drops-of-javascript

This book collects some useful, unknown, underrated JavaScript functions discovered and learned while using JavaScript daily.
https://drops-of-javascript.hi-folks.dev/
Other
151 stars 46 forks source link

Add array groupby documentation #75

Closed shahzdvp closed 1 month ago

shahzdvp commented 1 month ago

Add documentation and example for array.groupBy() method

Description

This pull request adds comprehensive documentation and a practical example for the array.groupBy() method in JavaScript. This contribution aims to help developers understand and effectively use this method for grouping array elements.

Changes Made

  1. Documentation:

    • Created a new file src/content/docs/02-array/22_array-groupby.md
    • Provided detailed explanation of the array.groupBy() method
    • Included syntax, parameters, return value, and usage examples
    • Added notes on browser compatibility and alternatives
  2. Example:

    • Created a new file examples/02-24_array-groupby.mjs
    • Implemented a practical example using a sample inventory dataset
    • Demonstrated grouping of inventory items by their type
    • Added comments explaining each step of the process

Documentation Overview

The documentation covers:

Example Overview

The example demonstrates:

Testing and Formatting

Additional Notes

Checklist

I'm open to any feedback or suggestions for improvement on both the documentation and the example. Thank you for reviewing this contribution!

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
some-drops-of-javascript ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 6, 2024 0:55am
shahzdvp commented 1 month ago

I have updated the example, please let me know your feedback

roberto-butti commented 1 month ago

please check the additional files you committed, i think by mistake