console.log
Write a line of text to the logs. This function is commonly used to debug or output status updates from scripts into the console.
js
console.log(...output)Parameters
| Parameter | Type | Description |
|---|---|---|
output | any | One or more values to write. Several values are joined into one line, and objects are written out in a readable form. |
Examples
js
console.log("The process has commenced");js
// Several values on one line
console.log("Starting import for period", period);js
// An object
const summary = { rows: 1200, rejected: 3 };
console.log("Import summary:", summary);Related
- console.warn
- console.error
- script.log: also writes a line of text to the logs.