Frontend Questions
- Why assigning too many ids to html elements is not a good practice? Ref
Elements with id will be global variables and properties on
windowobject.- This leads to more bugs, like if there’s a
varwith the same name of anidof a DOM node.
- This leads to more bugs, like if there’s a
If there’s a built-in global property or property of
windowwith the same name as theidof some DOM node, it will not be overriden by theidattribute.Example:
1 | <html> |

2.
Frontend Questions


