title: Why is there a syntax error when the left operand of the exponentiation operator is negative?
body: <p>When I use the exponent operator (<code>**</code>) in JavaScript, it normally works as expected:</p>
  
  <pre><code>2 ** 2   // 4
  2 ** -2  // 0.25
  </code></pre>
  
  <p>But when the left operand is negative</p>
  
  <pre><code>-2 ** 2
  </code></pre>
  
  <p>I get a syntax error:</p>
  
  <blockquote>
    <p>Uncaught SyntaxError: Unexpected token **</p>
  </blockquote>
  
  <p>I can get around it easily by putting parentheses around <code>-2</code></p>
  
  <pre><code>(-2) ** 2 // 4
  </code></pre>
  
  <p>but I'm curious about what caused this error. Other operators (<code>+ - * / %</code> etc) don't have this problem. Why does this happen for the <code>**</code> operator?</p>