DEV Community

Discussion on: Don't name your global JavaScript function 'clear'

Collapse
 
maciekbaron profile image
Maciek Baron

You should never need to define a function in the global scope, ever, unless you have a very specific need. This is really, really bad practice.