Skip to content

Commit 70ea38f

Browse files
vsemozhetbytMylesBorins
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 31aa877 commit 70ea38f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/console.md

+3-3
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);
@@ -249,7 +249,7 @@ prints the result to stdout:
249249

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

0 commit comments

Comments
 (0)