Use instructions for the console.info method in node.js

  • 2020-03-30 04:33:26
  • OfStack

Method description:

This method is the same as console.log(). From the source, it calls console.log directly.

Grammar:


console.info([data], [...])

Receiving parameters:

Accepts several arguments, and if there is only one argument, outputs the string form of that argument.

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.info('count: %d', count);

Source:


Console.prototype.info = Console.prototype.log;


Related articles: