Skip to content

Instantly share code, notes, and snippets.

@bennycode
Created December 9, 2017 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bennycode/96409da930548557009add90323e1a23 to your computer and use it in GitHub Desktop.
Save bennycode/96409da930548557009add90323e1a23 to your computer and use it in GitHub Desktop.
Node.js Prompt
const inquirer = require('inquirer');
const questions = [{
default: false,
message: 'Is this correct?',
name: 'isCorrect',
type: 'confirm',
}];
inquirer.prompt(questions)
.then(answers => (console.log('Is this correct: ', answers.isCorrect)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment