Most lines print nothing to the console.

Peek: see a line’s value, with no console.log.

End a line with //? and its value appears beside it, after every Run. Here is what it shows in a loop, before and after a change, several at once, and when there is no value.

01

See one line’s value

End a line with //? and, after the Run, its value appears beside it. In a loop, it is the value from the last pass.

The loop ran four times; 53 is the value from the last pass.
02

Every pass of a loop JSpark+

Hover the value and see what the line came to on each pass, in order, and how many times it ran.

Hovering → 53 lists every pass: 12, 19, 49, 53, four in all.
03

Just part of a value

After code, write an expression of $, the line’s value, such as //? $.length. If it throws, the Peek shows the error and the Run goes on.

Each Peek reads $, the value of its line. There is no users[2], so $.name threw.
04

Before and after

Put the same Peek before and after a line, and see what the line changed.

sort() changed the array itself, and sorted the numbers as text.
05

Several values at once

A /*? block takes one name on each line, so related values sit side by side.

The spread copied name, but both objects share one tags array.
06

When there is no value

A Peek always says something. A line the Run never reached says not reached, in lighter slanted text.

The loop body never ran, so the Peek says not reached.
07

Step by Step, in the Timeline

In the Timeline, a Peek shows its value at the Step on screen, so it changes as you move through the Steps.

Step by Step, the Peek shows 12, 19 and 49, and not reached yet before the loop.

Good to know

On every Run
Peeks update each time the code runs, as you type too.
Node and Web
Peek works in Node Snippets and in web pages alike.
Never written in
The value is drawn beside the line. Copying code copies the comment, not the value.
Long values, cut
A value longer than 60 characters is cut short. Hover it to see all of it.

Read the Peek docs All features

Next time you add a console.log, try //? instead.

Download free for Mac

Not a trial: it doesn’t expire.

Windows: coming later