---
title: "Discussion on \"Javascript Array.Splice vs Array.slice\" | Hashnode"
description: "Discussion on \"Javascript Array.Splice vs Array.slice\". Array.slice()\nslice() is a method of javascript array datatype that helps to get a subarray from an array. It doesn't change the original array.\nSyntax\nconst arr = [1,2,3,4,5,6]\nconst slicedArr = arr.slice(1,4) //Here the first parameter represents t..."
url: "https://hashnode.com/posts/javascript-arraysplice-vs-arrayslice/64f94a552b450b9c275b944f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Javascript Array.Splice vs Array.slice](https://bidhubhushan.hashnode.dev/javascript-arraysplice-vs-arrayslice?utm_source=hashnode&utm_medium=feed)

Array.slice() slice() is a method of javascript array datatype that helps to get a subarray from an array. It doesn't change the original array. Syntax const arr = \[1,2,3,4,5,6\] const slicedArr = arr.slice(1,4) //Here the first parameter represents t...

Sep 7, 2023 · 1 min read · bidhubhushan.hashnode.dev  
Read the article

-   [#slice](https://hashnode.com/tag/slice)
-   [#splice](https://hashnode.com/tag/splice)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#dsa](https://hashnode.com/tag/dsa)

## Written by

[Bidhubhushan Gahan](https://hashnode.com/@charlie1024)

@charlie1024

  
[View profile](https://hashnode.com/@charlie1024)

Frontend Enthusiast

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
