title: SyntaxError: missing ; before statement
body: <p>I am getting this error :</p>
  
  <pre><code>SyntaxError: missing ; before statement
  </code></pre>
  
  <p>Why would I get that from this code? How can I get around this ?</p>
  
  <pre><code>var $this = $("input");
  foob_name = $this.attr('name').replace(/\[(\d+)\]/, function($0, $1) {
     return '[' + (+$1 + 1) + ']';
  }));
  </code></pre>