Access last logged value in Chrome console

console.log, google-chrome, javascript

Solution

After it's been logged to the console, you can right click on it and get an option to Store as global object. Clicking this will define a new variable like 'temp1' which will point to the variable. Here's a video of it in action (not mine).

Problem

When I evaluate an expression directly in the Chrome Console like ``` 1 + 1 ``` then I can reference to the evaluated value using ``` $_ ``` However, I can't access the value with $_, when the value is a result of a console.log, coming from inside of my application, instead of an expression I typed directly into the console. Is there a way to access the last evaluated expression, regardless where it came from?

Original source