I have an array like this
arr = ["orange","red","black","white"]
I want to augment the array object defining a deleteElem()
method which acts like this:
arr2 = arr.deleteElem("red"); // ["orange","black","white"] (with no hole)
What is the best way to accomplish this task using just the value parameter (no index)?