Inspect the last selected element with dollar zero
Use $0 in the DevTools console to refer to the element selected in the Elements panel, and $1 to $4 for the ones selected before it.
Select an element in the Elements panel, then switch to the console. The variable $0 holds that element, so you can read it, change it or call methods without writing a selector.
$0.textContent
$0.classList.add("debug");
$0.getBoundingClientRect().width'Save'
undefined
84The three results are for a button that says Save, which is 84 pixels wide. $1 is the element selected before $0, up to $4, which is handy for comparing two nodes: $0 === $1.nextElementSibling. These variables are listed in the Console Utilities reference.
You can also pass $0 to functions that take an element, such as getComputedStyle($0).color, or to monitorEvents($0, "click").
The values exist only in DevTools. They are not available in your own scripts, so do not use them in code. If you select another element, $0 changes, which can surprise you in the middle of a long expression.
Nothing is saved: $0 is undefined before you have selected anything in a fresh session.