I am playing with the core modules of node js in VS code and i m unable to get it working with "readline" module.
I have the following code in js file.
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.question('Is it working ?', function (answer) {
console.log(answer);
});
when i run it this is what i see in debug console
node --debug-brk=4868 --nolazy Core.js
Debugger listening on port 4868
Is it working ?
No
not available
I am not sure what;s the issue here but it fails to log the answer to the console.