The idea behind Scratchpad is simple: the browser is a fantastic place to experiment with JavaScript.
Scratchpad is a great way to try out code in a live browser environment. Once you have the result you want, just copy the code back into your main file. This whole time, you didn’t have to reload the page even once.
Scratchpad also has a way to save its contents or load a JavaScript file. Using this feature, you could save Scratchpads with collections of commonly used functions. For example, maybe you have a site that you work on that has various bits of data that get loaded via Ajax requests. Save a file with a handful of those calls and you can always get the data you want when you’re working on that app.
Read more about features of Scratchpad here.