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 fix ‘Unchecked runtime.lastError: The message port closed before a response was received’ chrome issue?
- I am getting Failed to load resource: net::ERR_BLOCKED_BY_CLIENT with Google chrome
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- Error OPTIONS net::ERR_CONNECTION_REFUSED
- Getting “net::ERR_BLOCKED_BY_CLIENT” error on some AJAX calls
- 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
- 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?
- font-family is inherit. How to find out the font-family in chrome developer pane?
- 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
- What’s the difference between console.dir and console.log?
- Why does the URL http://a/%%30%30 crash Google Chrome?
- Disable same origin policy in Chrome
- Differences between socket.io and websockets
- Resource interpreted as stylesheet but transferred with MIME type text/html (seems not related with web server)
- Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
- Manifest is not valid JSON. Line: 1, column: 1, Unexpected token
- Disable Chrome pinch zoom for use in kiosk
- blocked a frame of origin “null” from accessing a cross-origin frame – chrome
- How to use jQuery in chrome extension?
- 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?
- Why do fonts appear jagged in Chrome?
- Chrome Error: You are using an unsupported command-line flag: –ignore-certifcate-errors. Stability and security will suffer
- CSS not working in Chrome
- How do I load an HTML page in a div using JavaScript?
- how to open Jupyter notebook in chrome on windows
- Can an attacker use inspect element harmfully?
- Resource interpreted as Document but transferred with MIME type application/zip
- Google Spreadsheet adding tooltip
- Chrome Broweser: csi.gstatic.com keeps loading
- How to force open links in Chrome not download them?
- How can I fix the “No certificates found – The app Chrome has requested a certificate” Android / Google Chrome issue
- Override USER AGENT STYLE SHEET – Chrome
- Resource interpreted as Document but transferred with MIME type application/json warning in Chrome Developer Tools
- Divi Child Theme Breaks WordPress Customizer
- ‘Password field is empty’ error when using autofill in Chrome
- Chrome Version 44.0.2403.89 m is trying to force HTTPS
- AJAX request from Chrome Extension to WordPress Website
- How do I authenticate WP users from a chrome extension?
- WordPress website loads but is not displayed until page scrolled
- WordPress Multisite local: wp-login.php refreshes on login Chrome Browser
- Admin menu bar dropdown opens when I click on a form element (Chrome) [closed]
- Does the 3.4.2 Dashboard have Chrome Frame headers?
- Chrome 83 doesn’t connect WP login page after update from http to https on localhost
- I just got my domain vsmathur.co.in verified by Google Domains, but cannot access my WordPress site, Help! [closed]
- Header’s CSS doesn’t work in Chrome and Opera – any ideas how to fix it?
- How to have an external DB read and get data from my wordpress database
- How can I say if a URL is a post, page, or taxonomy archive?
- Does heavy theme and plugins affect server’s response time? [closed]
- Loading issue on Chrome for my WordPress theme
- White blank page when Updating/Draft/Publishing Page/Post
- Setup cookie on Chrome even without HTTPS
- Google CSE Malfunctions via Chrome/Safari on Mobile When Clicking on Either Search Icon/Menu Icon. How to Make Google CSE Default Theme Search
- In-page link works in Firefox but not in Chrome
- Header formatting works for safari but not chrome @media screen size technique on iphone
- TinyMce Chrome newline issue