From 70ea38f2eeaf76aedf6b2a9314a491fa01c516be Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sun, 25 Dec 2016 19:57:12 +0200 Subject: [PATCH] doc: var -> const / let in the console.md PR-URL: https://github.com/nodejs/node/pull/10451 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- doc/api/console.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/console.md b/doc/api/console.md index 4de1c096430d16..6d75198d019d67 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -88,7 +88,7 @@ const errorOutput = fs.createWriteStream('./stderr.log'); // custom simple logger const logger = new Console(output, errorOutput); // use it like console -var count = 5; +const count = 5; logger.log('count: %d', count); // in stdout.log: count 5 ``` @@ -217,7 +217,7 @@ values similar to printf(3) (the arguments are all passed to [`util.format()`][]). ```js -var count = 5; +const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); @@ -249,7 +249,7 @@ prints the result to stdout: ```js console.time('100-elements'); -for (var i = 0; i < 100; i++) { +for (let i = 0; i < 100; i++) { ; } console.timeEnd('100-elements');