How can I get a line number for "Unexpected syntax error: Unexpected token c"?
-
27-09-2022 - |
Domanda
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.
Nessuna soluzione corretta
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow