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

feat: add copyWithin method documentation and example #68

Closed DomeT99 closed 1 month ago

DomeT99 commented 1 month ago
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 4, 2024 5:00pm
roberto-butti commented 1 month ago

Thank you @DomeT99 I believe that copyWithin is a challenging function in JavaScript arrays. To make it more accessible, I recommend providing additional examples with clear explanations and comments highlighting the expected output of each scenario, including any console.log statements.

You can start with a very basic example with just one parameter and then covering example for all the three parameters.

IF you have time and want to do it, feel free to do it. If you don't want, it is fine as well, i can merge this PR and eventually i can review it. Thank you for your PR :)

DomeT99 commented 1 month ago

You're right, copyWithin can be employed in multiple ways. I will provide other examples without problems and detail.

DomeT99 commented 1 month ago

I fixed the documentation and added a lot more details. For anything I remain available :rocket:

roberto-butti commented 1 month ago

Thank you, @DomeT99 , I'm going to merge the PR. Welcome as a contributor :)