Not quite sure how to phrase this question (I am sure it has been asked before in some form).
My problem is essentially shown below (through some badly written pseudo-javascript code):
var list = []
for (i to somenumber)
list.push(new myObject);
list.foreach(function(item){
if (item.name === 'WhatIAmLookingFor')
item.delete() <--- This needs to remove the object from list
}
So as my amazing code alludes to I want to be able to remove the item from the list by calling a function on an object in the list.
Sorry if this is an ignorant question but I cant figure out how to do this.