The Scratchpad tool, built into Firefox 6 and later, provides a handy environment for experimenting with Java Script code. You can write and test code ideas that interact with the contents of the web page, before switching to your usual development tools to finalize and clean up the end result
Ctrl-R to execute. Designed for chunks of code
Web Console -
Ctrl-Shift-K for executing one line at a time, as well as:
The Web Console won’t replace more advanced debugging tools like Firebug; what it does give you, however, is a way to let remote users of your site or web application gather and report console logs and other information to you. It also provides a lightweight way to debug content if you don’t happen to have Firebug installed when something goes wrong.