Skip to content

Instantly share code, notes, and snippets.

View khan4019's full-sized avatar

That JS Dude khan4019

View GitHub Profile

Cheat sheet extracted from https://www.youtube.com/watch?v=2zmUSoVMyRU by That JS Dude.


$()

If you pass any of the CSS selectors to $(<identifier>) you get the first element. This is an alias of document.querySelector. Point to be noted this only returns first element of the matched element.

> $('a')