Re:Underscore is a keyword in Java 9, use this script to che...
by sratner on Saturday January 14, 2017 @02:46PM
(#13400180)
Interestingly, _ is already reserved in the node.js console, so you have to import lodash under a different name.
[ Parent
| on HN ]
Re:Underscore is a keyword in Java 9, use this script to che...
by mattnewton on Saturday January 14, 2017 @04:07PM
(#13400556)
It's actually a magic variable that refers to the last expresion
https://nodejs.org/api/repl.html#repl_assignment_of_the_unde...
Re:Underscore is a keyword in Java 9, use this script to che...
by Nullabillity on Saturday January 14, 2017 @03:55PM
(#13400508)
Seems to work fine for me.
teo ~ node -v
v7.3.0
teo ~ node
> _ = "hi"
Expression assignment to _ now disabled.
'hi'
> _
'hi'
Re:Underscore is a keyword in Java 9, use this script to che...
by sratner on Sunday January 15, 2017 @07:10PM
(#13407350)
That's a fluke ;)
$ node
> _ = "hi"
'hi'
> _
'hi'
> foo = "bar"
'bar'
> _
'bar'
(See mattnewton's reply for explanation.)
Re:Underscore is a keyword in Java 9, use this script to che...
by Nullabillity on Sunday January 15, 2017 @09:16PM
(#13407827)
> _ = "hi"
Expression assignment to _ now disabled.
'hi'
> "bar"
'bar'
> _
'hi'
> foo = "bar"
'bar'
> _
'hi'