Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove item from array

//remove any item from array
const data = ['first', 'second', 'last'];
const filtered_data = data.filter((item) => return item !== 'second');

console.log(filtered_data) // ['first', 'last']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #item #array
ADD COMMENT
Topic
Name
6+1 =