Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 139683

Even though my if statement is satisfied this wont work [closed]

$
0
0

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);
        }
      }

Viewing all articles
Browse latest Browse all 139683

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>