mdn / css-examples

Code examples that accompany the MDN CSS documentation
https://developer.mozilla.org/en-US/docs/Web/CSS
Creative Commons Zero v1.0 Universal
604 stars 841 forks source link

Issue-#163-Resolved #171

Closed pragyamishra56 closed 7 months ago

pragyamishra56 commented 8 months ago
  1. Issue Number: #163
  2. Description: Modernize JavaScript usage in css-examples.
  3. Resolution: Replaced 'var' with 'const/let'.
  4. Outcome: Enhanced code readability and adherence to modern standards.
teoli2003 commented 7 months ago

The problem here is that you have done a find & replace.

The goal is not to replace all var by let, but to use const where possible too. Also, there are likely cases where var is correct, or where more changes are needed (as var behaviour may be different, especially wrt scope)

Can you start with 1 file or 1 group of files?

pragyamishra56 commented 7 months ago

@teoli2003 Sir I appreciate the clarification. I agree that a more thorough approach is needed. I'll work on breaking down the changes into separate PRs for a more comprehensive review. Thanks for guiding me through this process.