Common Programming Errors

By: Dusty Arlia
Published on August 8, 2012
Last Updated on Monday, July 06, 2015 at 1:16 PM
Total Updates: 5

Here are some examples of some common error messages that you will probably come across at some point:

  • Missing ) after argument list: This means you forgot to type a closing parenthesis at the end of a command/function. Here's an example:

    alert('Hello World!';

    The last parenthesis is missing after 'Hello World!'.

  • Unterminated string literal: You get this error by leaving out either the opening or closing quotation mark.
  • XXX is not defined: If you misspell a JavaScript command (For example aler('Hello World!');) you'll get an error saying that the command isn't defined (For example "aler is not defined").
  • Syntax error: Whenever Firefox doesn't understand your code, but not necessarily because of a typo, you might get this generic error message. This usually appears if you put together one or more statements of JavaScript in a way that isn't allowed. Troubleshooting these errors can be more difficult. Start by looking at the line where the error occurred. You will get better at solving these problems as you gain more experience.