September 17, 2017

Id in HTML gives window a key

Say you have a HTML tag like

<h1 id="lol">Hello</h1>

This means you can access the elements with an id lol by

window.lol
//=>
<h1 id=​"lol">​Hello​</h1>​