-
-
Save ajcrites/dac45004f11703e4a8fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Promise = require("bluebird"); | |
var readline = require("mz/readline"); | |
var userId = "blarg"; | |
var rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
}); | |
rl.question("are you sure\nplease enter userId").then(function (answer) { | |
if (answer === userId) { | |
return rl.question("danger bay was a good show"); | |
} | |
else { | |
console.log("user id is wrong, idiot"); | |
} | |
}).then(function (answer) { | |
if ("y" === answer) { | |
return console.log("dead"); | |
} | |
console.log("alive"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment