title: C assignments in an 'if' statement
body: <p>I came across this line of code written in C that confuses me coming from a JavaScript background.</p>
  <pre><code>short s;
  if ((s = data[q])) 
      return s;
  </code></pre>
  <p>Is this assigning <em>s</em> to <em>data[q]</em>, and if it equals true/1, return s?</p>