DEV Community

Discussion on: Dev Tools Tricks: Store objects and elements as variables in the console

Collapse
 
spalonytoster profile image
Maciej Posłuszny • Edited

In fact, if you select a different element in the inspector then it will become the subject of $0 and you will NOT lose the reference to the old one. It will become $1! It goes on to $4 so at any time you have references to 5 most recent elements! Great post, cheers :)

Collapse
 
philnash profile image
Phil Nash

Nice extra tip, thanks!