The global console object contains functions for printing text to the
screen, which can be useful for text-based applications, and is also
useful for debugging.
NOTE: Invoking any method on the console object switches the
application to text rendering mode, clearing any pixels previously
drawn on the screen using the Canvas API.
Type declaration
debug:function
debug(...input): void
console.debug() is an alias for console.log().
Parameters
Rest...input: unknown[]
Returns void
error:function
error(...input): void
Logs to the screen the formatted input as red text.
Parameters
Rest...input: unknown[]
Returns void
log:function
log(...input): void
Logs to the screen the formatted input as white text.
Parameters
Rest...input: unknown[]
Returns void
trace:function
trace(...input): void
Parameters
Rest...input: unknown[]
Returns void
warn:function
warn(...input): void
Logs to the screen the formatted input as yellow text.
The global
console
object contains functions for printing text to the screen, which can be useful for text-based applications, and is also useful for debugging.All methods use the
Switch.inspect()
method for formatting, and theSwitch.print()
method to output to the screen.