Did you know… there are browser console utilities like $0

Console logging out selected dom elements with $0

Kevin Jones
Nov 10, 2020

This is just a short record of a discovery [late 😬] I made yesterday. There I was, working away on Kent C Dodd’s Epic react fundamentals (highly recommended by the way) when he’s demonstrating something via a console log and enter $0 to get the selected DOM node in his dev tools…

What the actual…

Well tickle me pink, this was news to me. I asked a few colleagues and not one knew about it either. I fired out a tweet about it thanking Kent and announcing my regret for years lost using document.query plus whatever I could to select the element at hand.

Now what I did notice was thrice folded:

  1. Tagging popular people gets you lots of impressions 😀
  2. Plenty of people had NOT seen it either 👀
  3. There were more of them 💥

Thankyou @bcinarli for that forward of you’re tweet. I’ve been playing with these days and they’re so damn useful.

Familiar to me in the sense i know $_ from my Bash scripting and $('selector') is very JQuery indicative. I wonder if there are more out there, hidden away little easter eggs for me to find 😈.

Anyway hope that helps someone else out there.

--

--

Kevin Jones

Technologist and lead engineer @eBay web3 with 20 developing stuff for things with screens since Pocket PC's were fashionable and Geosites was a thing..