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"
Tweet