Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how can i remove a specific item from an array

const items = ['a', 'b', 'c', 'd', 'e', 'f']
const i = 2
const filteredItems = items.slice(0, i).concat(items.slice(i + 1, items.length))
// ["a", "b", "d", "e", "f"]
Source by flaviocopes.com #
 
PREVIOUS NEXT
Tagged: #remove #specific #item #array
ADD COMMENT
Topic
Name
9+5 =