A sync prompt for node. very simple. no C++ bindings and no bash scripts.
//
// write some text to the screen.
//
process.stdout.write('How many more times? ');
//
// get input from the user.
//
var n = prompt();
//
// do something dumb with it.
//
process.stdout.write(n + ' is ' + n + 'times too many');