Skip to main content
Console.log - node__console.d.ts - Node documentation
method Console.log

Usage in Deno

```typescript import { type Console } from "node:node__console.d.ts"; ```
Console.log(
message?: any,
...optionalParams: any[],
): void
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)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args) for more information.

Parameters

optional
message: any
...optionalParams: any[]

Return Type

void