View results of an executed statement

View the detailed result of an executed statement in a Quick Look preview or by adding a results view to the playground. Some results can be viewed in different ways. For example, the set of results for a number variable in a loop can be viewed as a graph of the values for each iteration of the loop, a set of values for each iteration, or the value of the last iteration.

View a Quick Look preview of the results

Add a results view to the playground

  1. In the sidebar, click the Show Results button for the line of code (or place the insertion point in the line of code, then choose Editor > Show Result for Current Line).

    A results view appears in the editor below the line of code.

Hide a results view in the playground

Resize a results view

  1. Hover the pointer over an edge or corner of the results view.

    The pointer changes to a double-headed arrow.

  2. Drag the edge of the results view to resize it.

Change the display of a results view

You can view some results in different ways. For example, the value of a number in a loop can be viewed as a graph, a series of values, or as the last value.