Skip to content

Conversation

@Akiyamka
Copy link

@Akiyamka Akiyamka commented Nov 8, 2024

Summary

Unnecessary code removed.

  • No need to declare the 'self' variable - we already have 'this' for this purpose
  • No need to declare a constructor - JavaScript will call super automatically if no constructor is declared
  • No need to convert the node list to an array - we have 'for' loops that can iterate over node lists directly

Unnecessary code removed.

No need to declare the 'self' variable - we already have 'this' for this purpose

No need to declare a constructor - JavaScript will call super automatically if no constructor is declared

No need to convert the node list to an array - we have 'for' loops that can iterate over node lists directly
@bsmth
Copy link
Member

bsmth commented Mar 28, 2025

Thanks for the submission! @wbamberg you touched these last, do you want to have a quick look?

@bsmth bsmth requested a review from a team as a code owner December 17, 2025 14:52
@bsmth bsmth requested a review from pepelsbey December 17, 2025 14:52
Copy link
Member

@pepelsbey pepelsbey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the effort to improve the demo! I would only suggest keeping the code style intact (single/double quotes) and only leaving the meaningful changes. Basically, we use Prettier's default config.

Also, there are many ways of doing the same thing in JS, and some of them improve in time, once we get new features or the browser support gets better. Others stay as a viable alternative and are just a matter of taste. I would suggest reviewing your suggestions from that perspective as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants