SyntaxError: missing ; before statement
Or you might have something like this (redeclaring a variable):
var data = [];
var data =
Looks like you have an extra parenthesis.
The following portion is parsed as an assignment so the interpreter/compiler will look for a semi-colon or attempt to insert one if certain conditions are met.
foob_name = $this.attr('name').replace(/\[(\d+)\]/, function($0, $1) {
return '[' + (+$1 + 1) + ']';
})
too many ) parenthesis remove one of them.