I'm trying to change all the values of my array that are "merger" to the "company" why won't it work?
mergingComp = document.getElementById("merger").value;
console.log(mergingComp);
for (i=0;i<arrTotal.length;i++){
if (arrTotal[i] == mergingComp) {
arrTotal.splice(i,1,company);
}
}
Aucun commentaire:
Enregistrer un commentaire