Skip to content

Instance Method

clear(lines:)

Deletes lines that were previously printed to the terminal.
func clear(lines: Int)

Parameters

lines

The number of lines to clear.

Discussion

console.print("Hello!")
console.clear(lines: 1) // clears the previous print