Skip to content

Commit

Permalink
http: replace var with const on code of comment
Browse files Browse the repository at this point in the history
`const` or `let` is more preferred than `var` except iteration.

PR-URL: #45951
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
deokjinkim authored and RafaelGSS committed Jan 5, 2023
1 parent 6c5b7e6 commit bc43922
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/_http_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ function onServerResponseClose() {
// array. That is, in the example below, b still gets called even though
// it's been removed by a:
//
// var EventEmitter = require('events');
// var obj = new EventEmitter();
// const EventEmitter = require('events');
// const obj = new EventEmitter();
// obj.on('event', a);
// obj.on('event', b);
// function a() { obj.removeListener('event', b) }
Expand Down

0 comments on commit bc43922

Please sign in to comment.