(async () => {
console.log('start');
while(true){
process.stdin.on('keypress', (str, key) => {
if (!!key.name) {
process.exit();
} else {
console.log(`You pressed the "${str}" key`);
console.log();
console.log(key);
console.log();
}
});
console.log("Hello");
}
})();
process.stdin.on('keypress', (str, key) => {
if (!!key.name) {
process.exit();
} else {
console.log(`You pressed the "${str}" key`);
console.log(!!key.name);
console.log(key);
console.log();
}
});
setTimeout((function a() {
console.log('I\'m Batman!');
setTimeout( a , 1);
}), 1);