Open oparkins opened 3 years ago
So this is something I knew in my head from basic principles I've learned in the past (DRY... don't repeat yourself); but I hadn't figured out a way to implement it in code yet. Looks like this is exactly what I needed to figure this out!
Thanks!
I would have recommended using a loop to add all of those event listeners. It would be something like this (untested:
That should make the code more readable and maintainable.