paint-brush
How to Delete an Item in an Array at a Specific Indexby@smpnjn
286 reads

How to Delete an Item in an Array at a Specific Index

by Johnny Simpson2mSeptember 19th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Arrays, which are common data structures in Javascript, look a little like this. They are a way to store data, which is commonly used throughout Javascript. If we want to delete items from an array, we can use the `splice` method that all arrays have. If you just want to use this method, you only have to use the index you want to start from, and the second is how many items you need to delete. The 'splice' method mutates your original array, so a copy of the original will not be made!
featured image - How to Delete an Item in an Array at a Specific Index
Johnny Simpson HackerNoon profile picture
Johnny Simpson

Johnny Simpson

@smpnjn

Product, Engineering, Web

About @smpnjn
LEARN MORE ABOUT @SMPNJN'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Johnny Simpson HackerNoon profile picture
Johnny Simpson@smpnjn
Product, Engineering, Web

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite