Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 70ea38f

Browse filesBrowse files
vsemozhetbytMylesBorins
authored andcommitted
doc: var -> const / let in the console.md
PR-URL: #10451 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 31aa877 commit 70ea38f
Copy full SHA for 70ea38f

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎doc/api/console.md‎

Copy file name to clipboardExpand all lines: doc/api/console.md
+3-3Lines changed: 3 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.