File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ const errorOutput = fs.createWriteStream('./stderr.log');
8888// custom simple logger
8989const logger = new Console (output, errorOutput);
9090// use it like console
91- var count = 5 ;
91+ const count = 5 ;
9292logger .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 ;
221221console .log (' count: %d' , count);
222222 // Prints: count: 5, to stdout
223223console .log (' count:' , count);
@@ -249,7 +249,7 @@ prints the result to stdout:
249249
250250``` js
251251console .time (' 100-elements' );
252- for (var i = 0 ; i < 100 ; i++ ) {
252+ for (let i = 0 ; i < 100 ; i++ ) {
253253 ;
254254}
255255console .timeEnd (' 100-elements' );
You can’t perform that action at this time.
0 commit comments