Console

Console API.

Used to print data for information or debugging purposes.

Method summary

Console has the following methods:

Method

Description

log("format", data1, data2, ...)

Writes specified data to trace.

dir(object)

Displays object data into the trace.

assert(expression,message)

Logs message only when expression is false.

time(label)

Marks timer to log execution time.

timeEnd(label)

Finishes timer, records output.

trace(label)

Prints stack trace.