I have read this question:
Deleting array elements in JavaScript - delete vs splice
And it appears that both splice and delete require an index of the elemen
var array = ["test1", "test2", "test3"]; array.splice(array.indexOf("test2"), 1);
indexOf (source): Returns the first index at which a given element can be found in the array, or -1 if it is not present.
indexOf