console.error
Writes an error to the process log. It works like console.log, but the line is logged as an error so it stands out. It doesn't stop the process.
js
console.error(...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
const response = web.get("https://api.example.com/rates");
if (response.error) {
console.error("Rate lookup failed:", response.error);
}