It’s the last selected DOM node index. Chrome assigns an index to each DOM node you select. So $0
will always point to the last node you selected, while $1
will point to the node you selected before that. Think of it like a stack of most recently selected nodes.
As an example, consider the following
<div id="sunday"></div> <div id="monday"></div> <div id="tuesday"></div>
Now you opened the devtools console and selected #sunday
, #monday
and #tuesday
in the mentioned order, you will get ids like:
$0 -> <div id="tuesday"></div> $1 -> <div id="monday"></div> $2 -> <div id="sunday"></div>
Note: It Might be useful to know that the node is selectable in your scripts (or console), for example one popular use for this is angular element selector, so you can simply pick your node, and run this:
angular.element($0).scope()
Voila you got access to node scope via console.
Related Posts:
- Where is the new Emulation tab in Chromes console drawer?
- How can I force a hard reload in Chrome for Android
- Does mobile Google Chrome support browser extensions?
- Chrome theme new tab background does not fill correctly
- Chrome hangs after certain amount of data transfered – waiting for available socket
- Chrome not Firefox are not dumping to SSLKEYLOGFILE variable
- When adding a JavaScript library, Chrome complains about a missing source map. Why?
- Chrome not Firefox are not dumping to SSLKEYLOGFILE variable
- Google Chrome forcing download of “f.txt” file
- How to disable JavaScript in Chrome Developer Tools?
- Failed to load PDF document in Chrome
- “CAUTION: provisional headers are shown” in Chrome debugger
- How to Fix ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY in IIS on Windows Server 2016
- Where does Chrome keep the SQLite Database file it writes things like stored passwords to?
- Where does Chrome store cookies?
- ResizeObserver – loop limit exceeded
- View google chrome’s cached pictures [closed]
- Paused in debugger in chrome?
- Duplicate headers received from server
- When running WebDriver with Chrome browser, getting message, “Only local connections are allowed” even though browser launches properly
- Apps, Extensions and scripts cannot be added from this website
- How to make audio autoplay on chrome
- How to disable Google Chrome auto update?
- Chrome Push Notification: This site has been updated in the background
- Google Chrome Ignoring Hosts File
- Workaround for Your Flash settings will be kept until you quit Chrome
- Disable developer mode extensions pop up in Chrome
- Difference between Chrome Apps and Extensions
- Copying HTML code in Google Chrome’s inspect element
- Chrome’s fonts are too light to read
- Chrome: console.log, console.debug are not working
- How to re-enable right click so that I can inspect HTML elements in Chrome?
- How to fix ‘Unchecked runtime.lastError: The message port closed before a response was received’ chrome issue?
- What caused the “Unchecked runtime.lastError: The message port closed before a response was received.” warning?
- How to fix ‘Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.’
- How to fix ‘Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.’
- I am getting Failed to load resource: net::ERR_BLOCKED_BY_CLIENT with Google chrome
- When you use ‘badidea’ or ‘thisisunsafe’ to bypass a Chrome certificate/HSTS error, does it only apply for the current site? [closed]
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- When you use ‘badidea’ or ‘thisisunsafe’ to bypass a Chrome certificate/HSTS error, does it only apply for the current site? [closed]
- Error OPTIONS net::ERR_CONNECTION_REFUSED
- When adding a JavaScript library, Chrome complains about a missing source map. Why?
- What is a user agent stylesheet?
- Getting “net::ERR_BLOCKED_BY_CLIENT” error on some AJAX calls
- No “Proceed Anyway” option on NET::ERR_CERT_INVALID in Chrome on MacOS
- Chrome returns “Bad Request – Request Too Long” when navigating to local IIS Express
- What is a user agent stylesheet?
- Getting “net::ERR_BLOCKED_BY_CLIENT” error on some AJAX calls
- Jupyter Notebook not saving: ‘_xsrf’ argument missing from post
- Hide scroll bar, but while still being able to scroll
- NET::ERR_CERT_REVOKED in Chrome, when the certificate is not actually revoked
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- Chrome sendrequest error: TypeError: Converting circular structure to JSON
- Jupyter Notebook not saving: ‘_xsrf’ argument missing from post
- require is not defined? Node.js
- Chrome: Uncaught SyntaxError: Unexpected end of input
- Cannot open local file – Chrome: Not allowed to load local resource
- Cannot open local file – Chrome: Not allowed to load local resource
- Getting Error “Form submission canceled because the form is not connected”
- How can I inspect element in an Android browser?
- Getting Error “Form submission canceled because the form is not connected”
- Is there a Google Voice API?
- What is the meaning of == $0 that is shown in inspect element of google chrome for the selected element [duplicate]
- font-family is inherit. How to find out the font-family in chrome developer pane?
- SBOX_FATAL_MEMORY_EXCEEDED error shown when Chromedriver turned 1800-1900 pages using Selenium
- ERR_INVALID_HTTP_RESPONSE using Angular 7 and ASP.Net Core 2.2 in Google Chrome browser
- This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console
- SyntaxError: Unexpected Identifier in Chrome’s Javascript console
- Chrome give error **Failed to load resource: net::ERR_NAME_NOT_RESOLVED** while other browser load images
- Running Selenium with Headless Chrome Webdriver
- Export html table data to Excel using JavaScript / JQuery is not working properly in chrome browser
- Chrome net::ERR_INCOMPLETE_CHUNKED_ENCODING error
- What’s the difference between console.dir and console.log?
- How can I quickly retrieve a value from a MapIterator returned from Object.keys function?
- Why does the URL http://a/%%30%30 crash Google Chrome?
- Disable same origin policy in Chrome
- Differences between socket.io and websockets
- How can I change the color of a Google Maps marker?
- Resource interpreted as stylesheet but transferred with MIME type text/html (seems not related with web server)
- Console.log not working at all
- Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
- Uncaught SyntaxError: Unexpected token :
- Manifest is not valid JSON. Line: 1, column: 1, Unexpected token
- Disable Chrome pinch zoom for use in kiosk
- How to fix “ERROR: Could not find method google() for arguments [] on repository container.” in android studio 3.5
- blocked a frame of origin “null” from accessing a cross-origin frame – chrome
- How to use jQuery in chrome extension?
- Disable Chrome strict MIME type checking
- Using google API to tell how busy a place is
- ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED in Google Chrome
- getElementsByAttribute() is not a function
- “AutoComplete=Off” not working on Google Chrome Browser
- When you use ‘badidea’ or ‘thisisunsafe’ to bypass a Chrome certificate/HSTS error, does it only apply for the current site?
- Chrome/jQuery Uncaught RangeError: Maximum call stack size exceeded
- Why an inline “background-image” style doesn’t work in Chrome 10 and Internet Explorer 8?
- Uncaught Reference Error: stLight is not defined (in Chrome only)
- What’s the difference between “Request Payload” vs “Form Data” as seen in Chrome dev tools Network tab
- Chrome says my extension’s manifest file is missing or unreadable
- eclipse for chrome?
- Why do fonts appear jagged in Chrome?