Why does Javascript have two ways of getting HTML elements for example one way is to use getElementByID and another is document.[element].[value]
Anonymous
getElementByID is just a DOM method that provides a shortcut to get to the element its ID attribut. The same element is still located in the DOM tree and can be accessed if we know his full path. There are more than 2 ways: by class name by tag name etc...
Check out your Company Bowl for anonymous work chats.