Skip to content

console.warn ​

Writes a warning to the process log. It works like console.log, but the line is logged as a warning so it stands out. It doesn't stop the process.

js
console.warn(...output)

Parameters ​

ParameterTypeDescription
outputanyOne or more values to write. Several values are joined into one line, and objects are written out in a readable form.

Examples ​

js
function end() {
    if (script.getRecordsProcessed() === 0) {
        console.warn("No records were loaded.");
    }
}