-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace var
with let
and const
#112
Comments
I would love to work on this. |
Hi @gitdevjin First of all, I am sharing my opinion on the basis of my understanding.I have gone though It indicates that the application is compatible with Node.js version 0.8.0 and later. However, if you replace Node.js Version Compatibility:
You can go through the below website that provides a comprehensive compatibility table for ECMAScript (JavaScript) features across various versions of Node.js. It allows developers to check which ECMAScript features are supported in different Node.js versions. I would like to reiterate that the information I've provided reflects my personal view. I encourage members of the |
Hi @sarraf1996. |
I don't think there's a problem with changing Also, the discussion about dropping support for old Node.js versions has been ongoing; |
@bjohansebas Thanks for your inputs. I tried to run 2 simple statements below. First, I tried to run in Node v0.8.0 (minimum compatible engine version of current repo. state) where Then, I tried to run the same code in other version of Node v20.15.0 installed on my system and in that version, both Please refer the screenshots for both the attempts. If we take Node v0.8.0 into consideration, then Your valuable inputs would be much appreciated. |
@sarraf1996
Thank you all, @sarraf1996 @bjohansebas, for your valuable insights! I’m just a student learning programming, and I’m eager to participate in open-source development. I’m learning so much from your feedback, and I truly appreciate your support. |
@gitdevjin Thank you for your extended checking with and without As previously mentioned by @bjohansebas, the discussion around dropping support for older Node.js versions has been ongoing. Your issue and PR have already been marked with the future label, indicating that this topic is under consideration. We'll keep an eye on the decisions made by the team as the discussion progresses. |
express has already released v5, which dropped support for Nodejs before 18. But cookie-parser is a very lightweight library and has been working well for years. So, I think keeping |
Description
According to the docs, using
var
is not recommended, unless it's necessary, It would be useful to replacevar
inindex.js
withlet
orconst
depending on their scope and usage. And also as it's less error-prone, this change can make the code more robust for the possible future code change.Task
var
withlet
orconst
inindex.js
filevar
withlet
orconst
inREADME.md
fileSupporting Docs and Articles
w3schools variables
Why don’t we use
var
anymore?The text was updated successfully, but these errors were encountered: