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 trialBrigitt Arndt
9,498 PointsWhat is a "syntax error"?
What is a "syntax error"?
2 Answers
Neil Docherty
10,418 PointsYou can think of a syntax error as being like a spelling or grammatical error.
For example, this would be a syntax error because the double quotation marks (** " **) are missing:
console.log( Hello World )
This would also be incorrect because the log() method has been typed with an uppercase l.
console.Log( "Hello World" )
The correct syntax ( spelling/grammar ) would be:
console.log( "Hello World" )
Jason Anders
Treehouse Moderator 145,860 PointsHi Brigitt,
A syntax error in programming is pretty much the same as a grammatical error in English. The most common type is a missed or misplaced character. There is a really good definition and explanation here: http://techterms.com/definition/syntax_error
Hope that helps. Keep Coding! :)