dir method

Prints the properties of an object to the console.

Syntax

var retVal = console.dir(value, optionalParams);

Parameters

  • value [optional]
    Type: any

    Object or element.

  • optionalParams
    Type: any

    Object or element.

  • retVal [out, retval]
    Type: boolean

Remarks

If more than one object or element is provided as parameters, only the last one will have the properties displayed.

See also

console

Using the F12 Tools Console to View Errors and Status