title: How to assign to a global variable in Sass?
body: <p>I run this Sass code:</p>
  
  <pre><code>$a: 1;
  @if 2 + 2 == 4 {
      $a: 2;
  }
  @debug $a;
  </code></pre>
  
  <p>I expect to see 2. The output, however, is: </p>
  
  <pre><code>Line 5 DEBUG: 1
  </code></pre>
  
  <p>I understand that Sass creates a new <code>$a</code> variable inside the <code>@if</code> scope. How can I change this behaviour and assign a value to the global <code>$a</code>?</p>
  
  <p>I use Sass 3.4.0.</p>