Write code for your later self and for your co-workers in the first place - not for the machine
Global variables and functions can be overwritten by other scripts
Using these types as objects, causes:
Choose easy to understand and short names for variables and functions.
“Good code explains itself” is an arrogant myth.
Shortcut notations keep your code snappy and easier to read once you get used to it.
Use a single object parameter and destructuring assignment instead. It also makes handling optional parameters much easier.
Use pure functions without side effects, whenever you can. They are really easy to use and test.