Interview GURU

What is the use of the underscore variable in REPL?

In REPL, the underscore variable is used to get the last result.

C:\Nodejs_WorkSpace>node  
> var x = 10  
undefined  
> var y = 20  
undefined  
> x + y  
30  
> var sum = _  
undefined  
> console.log(sum)  
30  
undefined  
>