DEV Community

Discussion on: 7 Killer JavaScript One-Liners that you must know

Collapse
 
ibrahimwehbi profile image
Ibrahim Wehbi

that's why it is a bad practice to use id(attribute) in HTML elements and that you should always use class(attribute), in larger scale applications you will face unpredictable behavior because Javascript will be filled with global variables