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']
 
PREVIOUS NEXT
Tagged: #remove #item #array
ADD COMMENT
Topic
Name
9+2 =