Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Console states different error than what the error actually is

I'm using Chrome and it shows the following error on Line 2: "Uncaught SyntaxError: missing ) after argument list"

But the thing is: in the code provided to us, there is NOT a missing parenthesis—the problem is that there are no beginning or end quote marks. In fact, of the errors in the scripts.js file, none of them are about missing parentheses.

Is there something about using the console or reading the error messages that I don't understand?

The console can show a general area where the error is in the lines just before what is indicated. Can you post your code?

3 Answers

But it was so specific! A vague "There's an error on line 8" makes more sense to me. Anyhow, good to know it's the vagaries of the console and not just me.

@Kris - I don't have it open anymore and I could easily see what the problem was and fix it. I was just confused as to why the console would say one type of error when it was a different type entirely. Thanks for responding.

Sometimes my console errors can be pretty vague or frustrating. Like Kris said, it points the line out, and what it generally thinks is the issue. It’s our job to figure out the solution. It thinks like a computer.