splice by name js code example Example: delete from array based on value javascript var index = array.indexOf(item); if (index !== -1) array.splice(index, 1);