The web browser will generally give you good feedback on an error message, with the exception of IE which is known for obtuse js errors. Syntax errors like the one you had usually generate fairly obvious errors, but its up to the individual browser type to choose how to warn you.
Chrome (ctrl+shift+i or ctrl+shift+j)
Firefox (install firebug addon, adds some nice stuff around the default FF console)
IE 8 + (f12)
Safari (Web developer tools in the preferences menu)
Short story: almost every modern browser already has these tools available either by default on a vanilla installation or as an addon.