When stdout
is a TTY, calling console.clear()
will attempt to clear the TTY.
When stdout
is not a TTY, this method does nothing.
Maintains an internal counter specific to label
and outputs to stdout
the number of times console.count()
has been called with the given label
.
Resets the internal counter specific to label
.
The console.debug()
function is an alias for {@link console.log()}.
Uses {@link util.inspect()} on obj
and prints the resulting string to stdout
.
This function bypasses any custom inspect()
function defined on obj
.
This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting
Prints to stderr
with newline.
Increases indentation of subsequent lines by two spaces.
If one or more label
s are provided, those are printed first without the additional indentation.
The console.groupCollapsed()
function is an alias for {@link console.group()}.
Decreases indentation of subsequent lines by two spaces.
The {@link console.info()} function is an alias for {@link console.log()}.
Prints to stdout
with newline.
This method does not display anything unless used in the inspector. Starts a JavaScript CPU profile with an optional label.
This method does not display anything unless used in the inspector. Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
This method does not display anything unless used in the inspector.
Prints to stdout
the array array
formatted as a table.
Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique label
.
Stops a timer that was previously started by calling {@link console.time()} and prints the result to stdout
.
For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other data
arguments to stdout
.
This method does not display anything unless used in the inspector.
Adds an event with the label label
to the Timeline panel of the inspector.
Prints to stderr
the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code.
The {@link console.warn()} function is an alias for {@link console.error()}.
A simple assertion test that verifies whether
value
is truthy. If it is not, anAssertionError
is thrown. If provided, the errormessage
is formatted usingutil.format()
and used as the error message.