title: if and else if statements ignored, Javascript
body: <p>I have a purple button. It becomes green onclick, even if in the if statement instead of purple I wrote Yellow. 
  Then it remains green, although the else if statement should make it purple again onclick. 
  What's wrong with my code?</p>
  
  <pre><code>`var m = document.getElementById ("buttonanimation");
      function changecolor(){
          if (m.style.backgroundColor="yellow"){
          m.style.backgroundColor="green";
          } else if (m.style.backgroundColor="green"){
          m.style.backgroundColor="purple";
          }
      }`
  </code></pre>