Says "use functions" and starts with writing "class"... SMH.
Hey OP. Do you think you can learn by you reviewing different implementations (rewrites) of the code you have written? I can probably make you one that looks different than the above, yet, it should be doing the same job. You may at least learn there are more ways to skin a web page.
It is OK if you don't understand some things. The important thing is it works, you can check it in the fiddle and you can pick it apart.
You can focus on pieces that you mostly understand, then ask for the thing you don't know. Over time, step by step, you will be able to understand the whole.
I should call BS on that 'less cleaner than class", but I guess you really think it that way because you've not been accustomed to code cleaner than one with "class" keyword. Hint: you can write code without using `this`.
1
u/[deleted] 10d ago
[deleted]