title: boolean operation trick
body: <p>I've seen this before in code, but forgotten it.  Basically it toggles a boolean variable.  If it's true, it'll set to false and vice-versa.  But unfortunately forgot the syntax.</p>
  
  <p>It's basically a one liner for this:</p>
  
  <pre><code>if (myVar) {  
      myVar = false;  
  } else {  
      myVar = true;  
  }  
  </code></pre>
  
  <p>It's something like this, but don't know what it's called or the correct syntax of it:</p>
  
  <pre><code>myVar = myVar : false ? true;
  </code></pre>