From 8c06e2f645900fdb6b991cc7cf1c8b0155951587 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Wed, 28 Dec 2022 20:39:57 +0900 Subject: [PATCH] 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 Reviewed-By: Matteo Collina Reviewed-By: Colin Ihrig Reviewed-By: theanarkh Reviewed-By: Luigi Pinca Reviewed-By: Zeyu "Alex" Yang Reviewed-By: Minwoo Jung Reviewed-By: Trivikram Kamat --- lib/_http_server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/_http_server.js b/lib/_http_server.js index dffce58d6b4016..303b407f22fcb7 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -262,8 +262,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) }