Last active
April 27, 2017 10:36
-
-
Save inoyakaigor/49b76675894e2408f63ac16d00ddbe79 to your computer and use it in GitHub Desktop.
This file contains 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
let appId = login = password = phone = '' | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}) | |
let asker = (variable, name) => () => rl.question(`Введите ${name}: `, answer => { | |
variable = answer | |
rl.close() // ЧТО Я ДОЛЖЕН ЗДЕСЬ НАПИСАТЬ? | |
}) | |
const askAppId = asker(appId, "app id") | |
const askLogin = asker(login, "логин") | |
askLogin() | |
askAppId() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment