What can be especially confusing is when you have only one call to console.log hidden away in your code that only gets called on certain conditions. Scripts before the call will run, but scripts after it won't because of the error. This is what was happening to me, and it led to me looking in all the wrong places to try to fix the problem before finding out what was really happening.
Dan Wilson has also posted a quick fix using jQuery:
Hopefully this information will save you from hunting all over your code for syntax errors like I did.