diff options
author | Guilherme de Souza <gui_souza@me.com> | 2014-09-12 07:07:05 -0300 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2014-09-17 14:16:29 -0700 |
commit | 378d9723f25cb5db88d2d0c74190800606d120f1 (patch) | |
tree | cb6b7b447288e4a4e894d3772b69a0fdbbdff1c4 | |
parent | 468fb547bb29e71535c09631a54c4e106b313a43 (diff) | |
download | nodejs-378d9723f25cb5db88d2d0c74190800606d120f1.tar.gz nodejs-378d9723f25cb5db88d2d0c74190800606d120f1.tar.bz2 nodejs-378d9723f25cb5db88d2d0c74190800606d120f1.zip |
doc: console example improvement
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
-rw-r--r-- | doc/api/console.markdown | 3 |
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, [...]) |