Docs / Start here
A tour of the window
The tabs at the top, the rail on the left, the code and its output, and the footer.
The tabs
The tabs are the window’s title bar. Each tab holds one Snippet. A tab is named after the Snippet’s first line until you give it a name: double-click the tab to rename it.
- + at the end of the tabs opens the list of Starters.
- ⌘T or Ctrl+T opens a new, empty Snippet of the same Kind as the one on screen.
- The × on a tab closes it. Right-click a tab to close the others, or the tabs to its right.
- The button at the right end of the tabs is the Layout menu: the code and the output side by side, or stacked.
JSpark keeps up to 3 tabs open; JSpark+ as many as you like. See Tabs and the Home screen.
The rail
The rail is the column of buttons on the left. From the top:
- Run ⌘↵ or Ctrl+Enter
- Runs the Snippet. It is on the rail when Run as you type is off. While a Run goes on for more than half a second, it becomes Stop (⌘. or Ctrl+.).
- Runs as you type / Runs on demand
- The bolt. Turns running as you type on and off. When the Snippet reaches outside JSpark, a warning shield takes its place, and the Snippet waits for you to run it. See Outside Access.
- Timeline ⌘⇧↵ or Ctrl+Shift+Enter
- Replays a Node Run one Step at a time. See Step Run and the Timeline.
- Add to Library JSpark+
- Keeps a copy of the Snippet in the Library. Saving to the Library is JSpark+.
- Library ⌘⇧L or Ctrl+Shift+L
- Opens your Saved Snippets.
- Packages
- Opens Packages, to find npm packages.
- Settings ⌘, or Ctrl+,
- Opens Settings.
Hover a button to see its name.
The code and the output
The code is on the left and its output on the right. For a Node Snippet, the output is the console: what the Run printed, and any error. The code also shows the values of your Peeks.
A web page Snippet has its code in Parts, HTML, CSS and JS, on a strip above the code. Its output is the page itself, above the page’s console.
Components and hooks
0
−+To put the output under the code, or on the other side, use the Layout menu or the View menu. See Layout and Web pages.
The footer
The footer is the line along the bottom. On the left, it says how the last Run ended, such as Done in 4ms, and when the next one happens, such as Runs as you type. When you have changed the code since that Run, it also says code changed since.
On the right, from the left:
- Language
- JavaScript or TypeScript. See JavaScript and TypeScript.
- Format
- Formats the code.
- Clear console
- Empties the console.
- Expanded or Collapsed by default
- Whether objects the console prints start open or closed.
Last is the edition you are using: JSpark, or JSpark+ with its plan. To see the buttons as words, set Settings → General → Button style to Words or Icons and words.
The other windows
Three things open in windows of their own.
- Library (⌘⇧L or Ctrl+Shift+L): your Saved Snippets, to search, open and copy. See The Library.
- Packages: search npm and read about a package. See Packages.
- Settings (⌘, or Ctrl+,): every setting, with a search box. See Settings.
Open each from the rail. Library and Packages are also in the Window menu.
Group by key
Turn a list into an object of lists
Theme
Button style
For the bar along the bottom and the Timeline. Icons show their names on hover; words spell them out, and fall back to icons where they would not fit.
When a tab you are closing has changes that are not in the Library. A Starter’s demo, or a snippet just as you saved or opened it, closes without asking.
The pictures show JSpark on a Mac. On Windows, the window looks a little different and uses Ctrl for ⌘, but everything works the same way.