//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']