files/en-us/web/api/console/log_static/index.md
{{APIRef("Console API")}} {{AvailableInWorkers}}
The console.log() static method outputs a message to the console.
console.log(val1)
console.log(val1, /* …, */ valN)
console.log(msg)
console.log(msg, subst1, /* …, */ substN)
val1 … valN
val1 is a string, which is described subsequently.msg
subst1 through substN in consecutive order up to the number of substitution strings. See Using string substitutions for a description of how substitutions work.subst1 … substN
msg. If there are more substitution values than there are substitution strings, the extra values are themselves written to the console after the detailed assertion message in the same manner as when there's no format string.See Outputting text to the console in the documentation of {{domxref("console")}} for further details.
None ({{jsxref("undefined")}}).
{{Specifications}}
{{Compat}}