web-components-examples icon indicating copy to clipboard operation
web-components-examples copied to clipboard

Update main.js

Open Akiyamka opened this issue 1 year ago • 0 comments

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

Akiyamka avatar Nov 08 '24 17:11 Akiyamka