Question

I'm working on a page and getting "Unexpected syntax error: Unexpected token c" attributed to line 1 of an empty index.

I want to double check that JSON values are valid, but what is the best way to get to the bottom of a line number for "there is a syntax error somewhere in your code, but I'm not telling where?" An approximation of a binary search, where you disable/enable narrower areas of your code and see if you can point a finger that way?

This may be a question for programmers, but I was wondering in general what to do with an error that Chrome doesn't give a useful line number for.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top