javascript if condition issue
<p>i have a variable CampaignType and it's value is 0.But in the alert(inside double star) it changes to 1.why so?
here is my javascript code snippet</p>

<pre><code>      if (CampaignType != 2) 
      {
       if (CampaignType = '1') 
        {
            **alert(CampaignType);**
            var CampaignAmount = (SelValue * CampaignPrice) / 100;
            SelValue = SelValue - (CampaignAmount);

        }
        else if (CampaignType = '0')
        {
            SelValue = SelValue - CampaignPrice;

        }
    }
</code></pre>
