Host console API

console.log()

Try the free JavaScript compiler

Displays values for inspection through the host console. The representation of objects and formatting may differ between hosts. Use return to provide a function result instead of relying on log output.

Formal Syntax & Structure

javascript syntaxjavascript
console.log(value, ...otherValues)

Parameters & Attributes

NameTypeDescription
valueanyFirst value to display; may be omitted.
otherValuesanyAdditional values to display.

Return Value

undefined

Does not return the displayed value.

Working Example

Example Snippetjavascript
console.log("Total");console.log(9);
JavaScript Reference