Outputs a message.
log(...values)
values variadic
The values to output.
If the first value is a string that contains format codes, it is used as a format string, and the remaining values are used as arguments for the format string.
%% - Replaced with a single percent sign (%).
%s - Replaced with a string.
%d or %i - Replaced with an integer. Can include width, for example %10d.
%f - Replaced with a floating point number. Can include width and precision, for example, %10.2f.
%o or %O - Replaced with a string representation of an object (currently, using JSON.stringifySafe).
console.log("Hello, world")
Hello, world
let n = 3.1415
console.log("The value of n is %2.1f", n)
The value of n is 3.1
console.log('%')
console.log('%%')
console.log('%d%', 10)
console.log('%d%%', 10)
%
%%
10%
10%