Skip to content Skip to sidebar Skip to footer

Javascript: Renaming Built In Functions

In Javascript, is it acceptable to rename built in functions. For example, in my code, I use document.querySelector() tons of times. This is extremely long and tedious to type ever

Solution 1:

No. Someone is going to come behind you to edit your code. They will then have to track down your renaming function to actually see what it does. Create an snippet in your IDE if it’s that much of an issue for you.


Post a Comment for "Javascript: Renaming Built In Functions"