|
|
|
|
|
by indocomsoft
2573 days ago
|
|
You have some pretty unidiomatic JS in there. For example: Array.prototype.filter.call(document.querySelectorAll(selector), filterFn); What's more idiomatic is
document.querySelectorAll(selector).filter(filterFn) The same holds for forEach. I suggest you look into how javascript prototype based OOP works |
|
This is why people convert it to an array, and one of many reasons the standard JS API (and the DOM one in particular) are annoying to work with.