just learned that JS automatically allocates global variables for all html elements with an id

codepen.io/wynd/pen/zYXOpwe

comments (single view)

wait really???

why have i been using getElementById then lol

i think it’s recommended

View all comments