Skip to content

Commit 3d181ce

Browse files
vsemozhetbytevanlucas
authored andcommitted
doc: var -> const / let in the console.md
PR-URL: #10451 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent f6ed233 commit 3d181ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/console.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const errorOutput = fs.createWriteStream('./stderr.log');
8888
// custom simple logger
8989
const logger = new Console(output, errorOutput);
9090
// use it like console
91-
var count = 5;
91+
const count = 5;
9292
logger.log('count: %d', count);
9393
// in stdout.log: count 5
9494
```
@@ -217,7 +217,7 @@ values similar to printf(3) (the arguments are all passed to
217217
[`util.format()`][]).
218218

219219
```js
220-
var count = 5;
220+
const count = 5;
221221
console.log('count: %d', count);
222222
// Prints: count: 5, to stdout
223223
console.log('count:', count);
@@ -248,7 +248,7 @@ prints the result to `stdout`:
248248

249249
```js
250250
console.time('100-elements');
251-
for (var i = 0; i < 100; i++) {
251+
for (let i = 0; i < 100; i++) {
252252
;
253253
}
254254
console.timeEnd('100-elements');

0 commit comments

Comments
 (0)