Thats my code:
async function startPro(){
await sendIt();
const genKey = 1234
const readline = require('readline').createInterface({
input: process.stdin,
output: process.stdout
});
readline.question('Please enter your key?', discKey => {
console.log(`Your key: ${discKey}!`);
});
console.log(discKey.length);
if (discKey.length == 4) {
for (var x = 1; x <= taskNr; x++){
openBrowser();
}
}
else{
console.log('nope')
}
}
startPro();
This is the part that should make an input-field, but it kind of just gets skipped, which results in an error.
const readline = require('readline').createInterface({
input: process.stdin,
output: process.stdout
});
readline.question('Please enter your key?', discKey => {
console.log(`Your key: ${discKey}!`);
});
Does somebody know how to fix that? I tried a lot of things, but nothing worked.