Open
Description
Quite a few examples in this repo extensively use var
.
This is a bad practice; we have eliminated them from mdn/content (and other repos). We should do the same here: most will be simply replaced by const
and let
, although there may be a few more complex cases (where var
is used inside a scope for a variable at a higher scope)
Activity
pragyamishra56 commentedon Jan 5, 2024
@teoli2003 Sir If it possible to allow me to fix this issue ?
teoli2003 commentedon Jan 5, 2024
Just go ahead; it is yours. Don't create too big PRs, they take longer to review.
pragyamishra56 commentedon Jan 6, 2024
@teoli2003 Sir Thanks for pointing this out! I completely agree with eliminating the use of 'var'. It's considered a best practice to use 'const' and 'let' for better scope management. I'll work on addressing this across the repository, replacing 'var' with the appropriate declarations. Your input is highly appreciated!
pragyamishra56 commentedon Jan 8, 2024
@teoli2003 Sir, Replace extensive var usage with const/let, aligning with the best So, should I replace 'var' with 'const/let'?
teoli2003 commentedon Jan 8, 2024
Yes.
pragyamishra56 commentedon Jan 8, 2024
@teoli2003 Sir, Could you confirm that In every JS file, I will replace the var with const/let?
teoli2003 commentedon Jan 8, 2024
With the relevant one, yes. If you are not sure, start with one file.
pragyamishra56 commentedon Jan 10, 2024
@teoli2003 Sir, Issue #163 is resolved now could you please have a look at it if any issue is raised then let me know
teoli2003 commentedon Jan 10, 2024
You need to open a pull request.
pragyamishra56 commentedon Jan 10, 2024
@teoli2003 Sir I opened a pull request could you review it if any further issue is raised then let me know
8 remaining items