J Playground (J in your browser!)

From J Wiki
Jump to navigation Jump to search

⬅ Return to 'Home'

⬅ Return to 'Welcome to J'

The J Playground runs an interactive J session in your browser.[1]


There are two windows: Term, an interactive console, and Edit, a script editor. The windows can be resized and flipped to be stacked vertically.


The Term window lets you type in and run J expressions.

  • if the cursor is on the last line of the display, press Enter to execute it.
  • if the cursor is on a line above the last line of the display, press Enter to copy it to the end of the display. You can then edit it and press Enter to execute it.

The window can be edited as you wish, for example to delete unwanted output.

The input log can be accessed either

  • by pressing the Ctrl+Shift up/down cursor keys. This steps through the inputs.
  • by pressing Ctrl+D or selecting menu View|Input Log. This shows a popup menu, where selecting an entry copies it to the end of the display.


The Edit window is for entering one or more J expressions for later execution.

You can select from the Examples menu to populate the Edit window with typical expressions, or enter your own expressions.

To run the current line, put the cursor on it and press Ctrl+Enter or Ctrl+Shift+Enter. The difference is that when the expression is an assignment, Ctrl+Enter has no output while Ctrl+Shift+Enter displays the assigned value.

You can run through all the J expressions in a window by holding down Ctrl or Ctrl+Shift and repeatedly pressing Enter. Alternatively, select menu Edit Run|All Lines.

If the current line starts a multi-line definition, the entire definition is read in.

Context Sensitive

Context sensitive help is available for J language primitives.

In either window, select the primitive, or put the cursor inside or to the left of a primitive. Press Ctrl+F1 for the vocabulary definition.

For example, with the cursor inside i. this will show the definition of Integers.

Also, in the Term window, put the cursor spaced out to the left or right of an expression, then press Ctrl+F1 to output J word formation on the line, e.g.

    2 3 4 +/ i. 5
 │2 3 4│+│/│i.│5│

J Playground Shortcuts

Focus in Term
 Enter Run Line
 Ctrl+Shift+Up Scroll Up Log
 Ctrl+Shift+Down Scroll Down Log
Focus in Edit
 Ctrl+Enter Run Line
 Ctrl+Shift+Enter Run Line and always Show
 Ctrl+R Run All Lines
 Ctrl+Shift+R Clear Term and Run All Lines
Focus in Term or Edit
 F1 Vocabulary
 Ctrl+F1 Context-Sensitive
 Ctrl+D Input Log
 Ctrl+Shift+C Center Panes
 Ctrl+Shift+L Flip Panes
 Ctrl+Shift+T Clear Term

This category currently contains no pages or media.