What would happen if you took your JS display:none function to a legacy project with a x style JS framework that has certain kinds of tools to style DOM elements? You seem to know exactly what happens with CSS in this case so I expect you to know the answer to JS things as well.
if there is a conflict like repeated function names etc it's very easyto debug, more often than not the browser will immediately tell you
How about you press F12 right now, open the console, and declare two JS functions with the same name into the window. Let me know what the error message says.
What would happen if you took your JS display:none function to a legacy project with a x style JS framework that has certain kinds of tools to style DOM elements? You seem to know exactly what happens with CSS in this case so I expect you to know the answer to JS things as well.
How about you press F12 right now, open the console, and declare two JS functions with the same name into the window. Let me know what the error message says.
So I tried it, and JS is alot easer to debug than css.
Easier how? I am not certain how that example should be read or executed to validate your point?