title: What does an exclamation mark before a variable mean in JavaScript
body: <p>I'm trying to learn JavaScript by going through some code in an application and I keep seeing <code>!variable</code> in if conditions. For example: </p>
  
  <pre><code>if (!variable.onsubmit || (variable.onsubmit() != false)) {
  </code></pre>
  
  <p>What is it? Some kind of test if the variable is empty?</p>