Skip to main content
Console.dir - Web documentation
method Console.dir
Private
Console.dir(
item?: any,
options?: any,
): void

Displays a list of the properties of a specified object

Examples

Example 1

console.dir({ name: 'object', value: 42 }, { depth: 1 });

Parameters

optional
item: any

Object to display

optional
options: any

Formatting options

Return Type

void
Back to top