It is like @CanIUse but for the browser devtools, created & curated by @pankajparashar. Get weekly tips & tricks for your favorite browser devtools by subscribing to the newsletter!
In the Elements tab, right click on the node in the DOM tree > Copy > Copy JS path. This will copy the query selector to the node that can be used in the JS code.