title: simple javascript if not working
body: <p>I'm new to javascript and am having issues with a seemingly simple if/else statement.</p>
  
  <p>Can anyone let me know why the below isn't working please (Im pulling my hair out)</p>
  
  <pre><code>var is_expanded = false;
  if (is_expanded==false) {
      alert('no');
      is_expanded = true;
  } else {
      alert('yes');
  }
  </code></pre>
  
  <p>I always get the 'no' alert (I never get to the else part).</p>
  
  <p>Cheers for any help.</p>