How to use Firefox's Scratchpad

The simple interface of Scratchpad can be quite convenient for JavaScript developers. This step-by-step guide will show you how to access the tool and how to use it to create and refine JS code.

Firefox contains a handy set of tools for developers, including integrated bug and web dashboards, as well as a code checker. Part of the browser 's web development kit is Scratchpad, a tool that allows programmers to experiment with JavaScript and execute it from within the Firefox window.

The simple interface of Scratchpad can be quite convenient for JavaScript developers. This step-by-step guide will show you how to access the tool and how to use it to create and refine JS code.

Use Scratchpad with Javascript

How to use Firefox's Scratchpad Picture 1How to use Firefox's Scratchpad Picture 1

First, open your Firefox browser. Click the Firefox menu button, located in the upper right corner of the browser window and denoted by three horizontal lines. When the drop-down menu appears, select the Developer option . A submenu will appear. Click Scratchpad, found in this menu. Note that you can use the following shortcut instead of this menu item: SHIFT + F4 .

Scratchpad will now be displayed in a separate window. The main section contains some brief instructions, followed by a space reserved for input. When you have entered some JavaScript code, click the Execute menu , including the following options:

  1. Run: This option executes the selected code in the Scratchpad window. The shortcut for this menu item is CTRL + R on Windows and COMMAND + R on Mac OS X.
  2. Inspect: This option executes the selected code and also opens a version of the object tester on the specific value returned. This allows you to drill down into a specific object. The shortcut for this menu item is CTRL + I on Windows and COMMAND + I on Mac OS X.
  3. Display: This option executes the selected code, displays the results directly in the editing window itself. The shortcut for this menu item is CTRL + L on Windows and COMMAND + L on Mac OS X.

This guide is only for users running Firefox web browser on Mac OS X or Windows.

Hope you are succesful.

4 ★ | 2 Vote