Const
Optional
message: anyRest
...optionalParams: any[]v0.1.100
Prints to stdout
with newline. Multiple arguments can be passed, with the
first used as the primary message and all additional used as substitution
values similar to printf(3)
(the arguments are all passed to util.format()
).
const count = 5;
console.log('count: %d', count);
// Prints: count: 5, to stdout
console.log('count:', count);
// Prints: count: 5, to stdout
See util.format()
for more information.
Optional
message: anyRest
...optionalParams: any[]v0.1.100
The console.warn()
function is an alias for error.
Optional
message: anyRest
...optionalParams: any[]v0.1.100
Prints to
stderr
with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar toprintf(3)
(the arguments are all passed toutil.format()
).If formatting elements (e.g.
%d
) are not found in the first string thenutil.inspect()
is called on each argument and the resulting string values are concatenated. Seeutil.format()
for more information.