Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you really need a shortcut then

    const $ = (sel, elem = document) => [ ...elem.querySelectorAll(sel) ]
is nicer as you can use CSS selectors.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: