Loading video...

Video Failed to Load

Go Home

🔥 4 JavaScript console tips: $, $$, $0 → $4 and $_

169,309 views • 3 years ago •via X (Twitter)

10 Comments

Sam Sedighian's profile picture
Sam Sedighian3 years ago

Amazing how you are fitting so much in such short video! Well done as always @wesbos 👏🏼

Wes Bos's profile picture
Wes Bos3 years ago

thanks!

Corey Salzano's profile picture
Corey Salzano3 years ago

Very cool

Gonçalo Dias's profile picture
Gonçalo Dias3 years ago

Interesting, almost like jQuery but on the browser console.

Neil Chudleigh's profile picture
Neil Chudleigh3 years ago

Damn! Those are good ones, going to try and use em today.

Catalin Rosu's profile picture
Catalin Rosu3 years ago

Nice tips, Wes! I wrote the following a while ago and, in case it helps, $r or $vm0 return the respective React or Vue components too:

Marco Biedermann's profile picture
Marco Biedermann3 years ago

Maybe worth mentioning this is a feature in the @ChromeDevTools console only. This is not part of the JS spec. So it does not work in Node or any other environments.

Not Penny’s Boat 🛥️'s profile picture
Not Penny’s Boat 🛥️3 years ago

I had no idea until literally last week! My knowledge has only gone as far as $0. Have always been typing the full document.querySelector() bs...

Marcel Cruz's profile picture
Marcel Cruz3 years ago

I never knew beyond the single $. Thanks for so many tips in only one video!

Matvey's profile picture
Matvey3 years ago

You can also use copy() function to copy something to the clipboard from the console.

Related Videos