What is the benefit of using console.log
vs console.info
?
Or any of the other console commands for that matter?
console.info(\"info\")
According to the docs it's pretty clear.
console.info([data], [...])# Same as console.log.
console.error([data], [...])# Same as console.log but prints to stderr.
console.warn([data], [...])# Same as console.error.
This means there is no benefit or downside. info
== log
, and warn
== error
. Unless you want to print to stderr
, info
and or log
will work.