title: How do i check if a variable is a specific number in JS
body: <p>Im trying to make a simple clicker game (im pretty new to coding in javascript) but the player can buy things even if they dont have enough, so i tried to do this</p>
  <pre><code>function clickpowup() {
      if(click += 50) {
          clickpower += 5;
          click += -50;
      }
      if(click !== 50) {
         alert(&quot;Not enough cookies&quot;)
           
   }
  </code></pre>
  <p>This is how my variables are laid out above the text</p>
  <pre><code>var click = 0;
  var clickpower=1;
  </code></pre>