title: In JavaScript console.log
body: <p>I'm having trouble with the JavaScript syntax. Why does this work:</p>
  
  <pre><code>console.log($rootScope.wg.variable1);
  </code></pre>
  
  <p>But this doesn't (says its <code>undefined</code>):</p>
  
  <pre><code>console.log($rootScope.wg.variable+1);
  </code></pre>
  
  <p>I tried some other syntax, but could't find one which is working.</p>