Is there a way to interact with the last logged object in Chrome Dev Tools?
google-chrome-devtools
Solution
You can actually use `$_` to get the previously evaluated statement
$$ // Returns an array of elements that match the given CSS selector.
$0 // The currently-selected object in the inspector.
$_ // The previously evaluated statement
$1 // The previously-selected object in the inspector.
$n(index) // Access to an array of last 5 inspected elements.
For a complete list of everything there is that you can use for all parts of chrome check out the cheatsheet. http://anti-code.com/devtools-cheatsheet/
Problem
If I use `console.log` to log an object from inside a script, I can see that object in the console, and I can inspect it by clicking the little arrows. So I can see what methods it has (even in its prototype). But is it possible for me to run one of those methods from right there in the console? In other words, is there some kind of magic variable (similar to `$0`) that I can type into the console, which will get me the last logged object?