Method description:
This method is the same as console.log() , just output to the standard error stream.
grammar:
The code copy is as follows:
console.error([data], [...])
Receive parameters:
console.log accepts several parameters. If there is only one parameter, the string form of this parameter is output.
If there are multiple parameters, it is output in a format similar to the C printf() command.
If there are no parameters, just print a newline
example:
The code copy is as follows:
var count = 1234;
console.error('count: %d', count);
Source code:
The code copy is as follows:
Console.prototype.error = Console.prototype.warn;