Equivalent to pry / irb_, but in node?

I am very familiar with the Ruby REPL, irb and pry. In both cases, if I print something and forget to store it in a variable, I can access the last outputted thing by typing_

For example, in irb,

>> [2,3,4]
=> [2, 3, 4]
>> _
=> [2, 3, 4]
>> 

      

In folder

[1] pry(main)> [2,3,4]
=> [2, 3, 4]
[2] pry(main)> _
=> [2, 3, 4]
[3] pry(main)> 

      

My question is, is there a similar thing in Node?

+3


source to share


1 answer


Node docs :



A special variable _

(underscore) contains the result of the last expression.

+2


source







All Articles