简体   繁体   English

从Chrome开发人员工具控制台获取上次返回的值

[英]Get last returned value from Chrome developer tools console

In some consoles (like python, ruby's irb, or node) you can access the return value from your last statement with an underscore: 在某些控制台(如python,ruby的irb或节点)中,您可以使用下划线访问上一个语句的返回值:

> 'Hello'
'Hello'
> _
'Hello'

Is there something similar in developer's tool console for chrome, or firefox? 在开发人员的工具控制台中是否有类似chrome或firefox的东西?

You can use $_ to get the last returned result. 您可以使用$_来获取最后返回的结果。

> 'Hello'
"Hello"
> $_
"Hello"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM