JScript in/out console for Windows Script Host
function print(text) { | |
WScript.Echo('> ' + text); | |
} | |
var stdin = WScript.StdIn; | |
var stdout = WScript.StdOut; | |
var input; | |
do { | |
var input = stdin.ReadLine(); | |
try { | |
print(eval(input)); | |
} catch (e) { | |
print(e.name + ': ' + e.message); | |
} | |
} while (input != 'exit'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
execute with
cscript WSHRepl.js
output with
print('text');