this post was submitted on 25 Jan 2025
593 points (97.6% liked)
Programmer Humor
20265 readers
1788 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Urge to analyse... rising...
My first guess would be to take out that semicolon on line 264. JavaScript will often happily take a new line as end of statement if it makes sense to do that, so in theory, that semicolon is not needed. And it might be a Greek question mark your prankster colleague put in your code when you weren't looking.
And then I'd be tracing parentheses, curlies, quotes and so on, because that error could be the point the parser gave up trying to make sense of the code rather than where the error actually is.
And if that didn't find it, I'd put in a deliberate error at an earlier, known line to see where the parser thinks that error is. If it's offset by 20 lines, then I know the original error is probably offset by a similar amount.