Description of the console.error method in node.js
- 2020-03-30 04:32:41
- OfStack
Method description:
This method is the same as console.log(), but outputs to the standard error stream.
Grammar:
console.error([data], [...])
Receiving parameters:
Console.log takes several parameters, and if there is only one parameter, it outputs the string form of that parameter.
If there are more than one argument, the output is in a format similar to the C printf() command.
If there are no arguments, only a newline character is printed
Example:
var count = 1234;
console.error('count: %d', count);
Source:
Console.prototype.error = Console.prototype.warn;