summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/api/console.markdown3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/api/console.markdown b/doc/api/console.markdown
index 5cfe068f2..1517304d2 100644
--- a/doc/api/console.markdown
+++ b/doc/api/console.markdown
@@ -27,7 +27,9 @@ should worry about unless you log huge amounts of data.
Prints to stdout with newline. This function can take multiple arguments in a
`printf()`-like way. Example:
+ var count = 5;
console.log('count: %d', count);
+ // prints 'count: 5'
If formatting elements are not found in the first string then `util.inspect`
is used on each argument. See [util.format()][] for more information.
@@ -73,6 +75,7 @@ Finish timer, record output. Example:
;
}
console.timeEnd('100-elements');
+ // prints 100-elements: 262ms
## console.trace(message, [...])