I have just started learning to code.
Code B does not use Document.selectSomething per say and yet works, it seems to me the id of an element can be used directly to add event listeners without having to document select the element then adding event listeners