SyntaxError: unexpected token: identifier

If you are using the developers console in firefox, chrome or other browser, you may come across this javascript error in your console that says:
SyntaxError: unexpected token: identifier

What does "SyntaxError: unexpected token: identifier" mean and how do you fix it?

This simply means you wrote something in your javascript code which is not recognized as a javascript command. for example:

Wrong: alet('foo'):

Correct: alert('foo');

Hope that helps