Hacker News new | ask | show | jobs
by fs_tab 912 days ago
Elements with an id are globals, so you do this (not that it's recommended):

    count.innerText = 
    up.onclick = 
    down.onclick =
etc
1 comments

Technically, every element that's not in the shadow DOM is a global. But yes, there's plenty of ways to implement this and an argument to had for most of them.
Right, I should have clarified that they're properties of the window object.