Firebug is a very powerful tool when it comes to finding and solving errors in javascript code.
To deal the errors of JavaScript code check the following reference.
http://www.w3resource.com/web-development-tools/firebug-tutorials.php
Try it into Mozilla and check JavaScript core 1.5 and some new features in 1.6, 1.7
Also you can visit :
http://www.w3resource.com/javascript/javascript.php
They maintain 1.5 version. Lots of examples and simple English.