I am saving mobile numbers in array on check of checkbox and removing the mobile number when unchecked.
I tried this but it is not deleting the exact number which is unchecked.
var $this = $(this);
var index = parseInt($this.attr("_idx").slice(1));
console.log("index"+index);
if (index >=0 && index < recep.length) {
recep.splice(index, 1);
console.log("to2"+recep);
}