http: replace var with const on code of comment

`const` or `let` is more preferred than `var` except iteration.

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Deokjin Kim 2022-12-28 20:39:57 +09:00 committed by GitHub
parent 8dfd905ba3
commit 5754e04c9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) }