This will solve you to delete an element from an array in JQuery using the index
Consider following is my array
- localHeaderColumnArray: Array[2]
- 0: "f"
- 1: "g"
- length: 2
To delete an element
- delete localHeaderColumnArray[$(this).index()] ;
Since I am using it in a click event of an li, I used $(this).index(). You can change it as
- delete localHeaderColumnArray[$(this).index()] ;