Most of the time unexpectedly closed, or not closed, or incorrectly closed function arguments may cause issues. The console tab of the firebug might help a lot.
There used to be script debugger that worked well with IE 6 that was allowing you not only to see the result of the error ( the error message itself ) but to even trace step by step the code. Yes, it was a bit more advanced as usage but it's sad that there is no such more modern implementation. Anyways, I keep using this from time to time, simply running the problem page/script into a IE 6 emulator and the instance of the debugger. Debuggers are quite old school but extremely powerful tools. Remind me of good old assembler debuggers like SoftICE...
There are so many areas where you can make a syntax error. For that you should write your program very carefully.
Syntax errors refer to simple errors in code – for example, missing a parenthesis in an if statement for if variable==value) – which will trigger an error in the JavaScript interpreter.