This is a question about noob.
I am trying to use REPL (read-evaluate-print) node.jsas a shell JavaScriptfor working with JavaScript interactively. Unfortunately, I cannot define either variables or functions.
> var x = 'abc'
undefined
> function f () {}
undefined
>What can I do to use node.jsREPL as a shell?
PS I know that I can use Rhino Shell , but I would prefer node.
source
share