Today I Learned

A Hashrocket project

Last Logged Value in Chrome

When using the Chrome DevTools console as a REPL, we can access the last logged value with $_. Here’s a common use case, variable assignment:

> "Call me Ishmael"
< "Call me Ishmael"
> const openingLine = $_
< "Call me Ishmael"
> openingLine
< "Call me Ishmael"
Looking for help? At Hashrocket, our JavaScript experts launch scalable, performant apps on the Web, Android and iOS. Contact us and find out how we can help you.