I have a function using an array value represented as
markers[i]
use array.splice method to get an array of elements excluding this one.
That affects the array permanently, if you do not want that, create a copy first.
var origArray = [0,1,2,3,4,5];
var cloneArray = origArray.slice();
var i = 3 ;
cloneArray.splice(i,1);
document.write(cloneArray.join("---"));