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:
parent
8dfd905ba3
commit
5754e04c9f
@ -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) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user