Unexpected Identifier or Syntax Error? Look Here First Before Posting!


What's The Problem?

Many of the concerns posted on this forum have to do with a mistake made when writing the code, more common among the introductory courses, these mistakes, leading to either a syntax error, or an unexpected identifier. These more descriptive errors are ones you would receive if you used the developer tools console (press f12 and click console tab) to test your code, errors you receive only from Codeacademy may not be nearly as helpful, although will let you know if your error has to do with the lesson and not necessarily a javascript error.

However when it comes to the integrity of the code you write, these are the most common types of mistakes made and questions asked, writing your code wrong, or missing a semicolon, sometimes you may just be unwilling to look through it line by line?

What's My Position?

This is a very common problem and I don't propose a solution out of an annoyance with the questions but with a desire to aid the betterment individuals going through and learning for themselves how to code, to enforce a long lasting understanding and integrity in their code, and encourage their own ability to see where these errors arise and how they may fix them without assistance. I personally do not have extensive knowledge with this resource as I've used my own troubleshooting skills and I share this more out of the necessity I see than that I am making some promotion for this tool. This suggestion is with the users of Codacademy in mind to better the quality of their understanding of javascript and general syntax related issues as they relate to one another between languages.

This is also posted here so that the users with the problems may see it immediately rather than having to go elsewhere which may not be likely if they want a quick solution.

JSHint: The Syntax Proofreader

Having read this far, I personally would strongly suggest anyone new, confused, or still learning the javascript language here who has encountered an error to use the resource below:


Getting Started

To get started, post your code over the given example code, and it'll be read, with a report returned in the right hand side of the window. Read through the report and find if there are errors, make sure to note the line numbers of the console to the left that they occur on, this will allow you to spot them easily, and use the error message to learn what may be wrong. The error message returned is going to be expecting an understanding of javascript so go along with the terminology and your own understanding to determine what may not be appropriate about your code.

If/ Else if/ Else
Syntax Error?
What if Choise 1 is paper?
Question 21 what have i done wrong?
Paper, rock, scissors confusion
Browser Crashing every time
What is wrong with my code?
Build Rock, Paper, Scissors... 7. What if Choice 1 = paper