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 documentation for Array.prototype.slice() #46

Closed mahmlk closed 1 month ago

mahmlk commented 1 month ago

This pull request adds detailed documentation for the Array.prototype.slice() method, including its description, syntax, parameters, return value, example usage, and related methods.

The slice() method is crucial to JavaScript's array functionality, allowing developers to extract portions of an array and create shallow copies. This documentation aims to comprehensively understand how to use the slice() method effectively.

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 ❌ Failed (Inspect) Sep 16, 2024 9:28pm
roberto-butti commented 1 month ago

Thank you for your effort and your PR!

I see in the markdown file the frontmatter section is missing. The frontmatter section is required for adding some mandatory meta data. An example of frontmatter section, to add at the begin of the markdown file is:

---
title: 'Reducing an Array'
sidebar:
  label: Reducing Array
---
roberto-butti commented 1 month ago

Hi @mahmlk thank you for your PR, in the meantime we already merge another PR. You can see it there The file is https://github.com/roberto-butti/some-drops-of-javascript/blob/main/src/content/docs/02-array/14_array-slice.md

In order to avoid losing your precious contribution, feel free to integrate and enrich that file (if you are still interested), adding your examples or use cases. Thank you!