October 30, 2017

The identity of "== $0" in developer tool

identity of $0 in Chrome developer mode

You may have seen the above string in Chrome developer mode.

It is a variable of the command line API. It stores what is selected in the "Element" panel or "Profiles" panel.

"$0" is the currently selected item.




checking of $0 in Google Chrome developer mode

You can check $0 at the console with the "console.log($0);".

There are five such variables($0 to $4). For example, $4 is the item you selected before the fifth.


※ More information on APIs in developer mode can be found here(Link).