In my array pvalue, each number is unique. It contains: 1 2 3 15 20 12 14 18 7 8 (total of 10 numbers).
My goal is to remove the number "15" from the array, resulting in pvalue being: 1 2 3 20 12 14 18 7 8 (now with 9 numbers). How can I achieve this without using the pop() function?
I do not want to target the value at the end of the array. Any suggestions would be appreciated!
EDIT
for(i=0; i<pvalue.length; i++) {
if(pvalue[i]==param) {
ind=i;
break;
}
}
pvalue.splice(ind, 1);