A simple assertion test that verifies whether value is truthy.
A simple assertion test that verifies whether value is truthy. If it is not, an AssertionError is thrown. If provided, the error message is formatted using util.format() and used as the error message.
console.assert(value[, message][, ...])
A simple assertion test that verifies whether value is truthy.
A simple assertion test that verifies whether value is truthy. If it is not, an AssertionError is thrown. If provided, the error message is formatted using util.format() and used as the error message.
console.assert(value[, message][, ...])
When stdout is a TTY, calling console.clear() will attempt to clear the TTY.
When stdout is a TTY, calling console.clear() will attempt to clear the TTY. When stdout is not a TTY, this method does nothing.
Note: The specific operation of console.clear() can vary across operating systems and terminal types. For most Linux operating systems, console.clear() operates similarly to the clear shell command. On Windows, console.clear() will clear only the output in the current terminal viewport for the Node.js binary.
Maintains an internal counter specific to label and outputs to stdout the number of times console.count() has been called with the given label.
Maintains an internal counter specific to label and outputs to stdout the number of times console.count() has been called with the given label.
the display label for the counter. Defaults to 'default'.
Resets the internal counter specific to label.
Resets the internal counter specific to label.
the display label for the counter. Defaults to 'default'.
Uses util.inspect() on obj and prints the resulting string to stdout.
Uses util.inspect() on obj and prints the resulting string to stdout. This function bypasses any custom inspect() function defined on obj
console.dir(obj[, options])
Uses util.inspect() on obj and prints the resulting string to stdout.
Uses util.inspect() on obj and prints the resulting string to stdout. This function bypasses any custom inspect() function defined on obj
console.dir(obj[, options])
Prints to stderr with newline.
Prints to stderr with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()).
the given data arguments
console.error([data][, ...])
Increases indentation of subsequent lines by two spaces.
Increases indentation of subsequent lines by two spaces. If one or more labels are provided, those are printed first without the additional indentation.
the labels
An alias for console.group().
An alias for console.group().
Decreases indentation of subsequent lines by two spaces.
Decreases indentation of subsequent lines by two spaces.
The console.info() function is an alias for console.log().
The console.info() function is an alias for console.log().
console.info([data][, ...])
Prints to stdout with newline.
Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()).
the given data arguments
console.log([data][, ...])
Starts a timer that can be used to compute the duration of an operation.
Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique label. Use the same label when you call console.timeEnd() to stop the timer and output the elapsed time in milliseconds to stdout. Timer durations are accurate to the sub-millisecond.
console.time(label)
Stops a timer that was previously started by calling console.time() and prints the result to stdout
Stops a timer that was previously started by calling console.time() and prints the result to stdout
console.timeEnd(label)
Prints to stderr the string 'Trace :', followed by the util.format() formatted message and stack trace to the current position in the code.
Prints to stderr the string 'Trace :', followed by the util.format() formatted message and stack trace to the current position in the code.
console.trace(message[, ...])
Prints to stdout with newline.
Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()).
the given data arguments
console.log([data][, ...])
Used to print to stdout and stderr. See the console section.