![]() |
The Syntax:array.slice(startIndex, endIndex);
Parameters:
Example: Here, the slice() method extracts the array from the given array starting from index 2 and including all the elements less than index 4. Javascript
Output
[ 23, 56, 87, 32, 75, 13 ] [ 87, 32 ] |
Reffered: https://www.geeksforgeeks.org
JavaScript |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 14 |