Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

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