Skip to content

Instantly share code, notes, and snippets.

@Siedrix
Created January 24, 2016 15:16
Show Gist options
  • Save Siedrix/8e81d993709af1ccab6d to your computer and use it in GitHub Desktop.
Save Siedrix/8e81d993709af1ccab6d to your computer and use it in GitHub Desktop.
Ejercicios de la tarea 1
var inquirer = require('inquirer')
var valorAAdivinar = 6
inquirer.prompt([
{
type:'input',
name:'adivina',
message:'Elije un numero del 1 al 10'
}
], function (answers) {
var numero = Number.parseInt(answers.adivina)
if(numero === valorAAdivinar){
console.log('Le atinaste')
}else{
console.log('El numero es otro')
}
})
var inquirer = require('inquirer')
var valorAAdivinar = 6
inquirer.prompt([
{
type:'input',
name:'adivina',
message:'Elije un numero del 1 al 10'
}
], function (answers) {
var numero = Number.parseInt(answers.adivina)
if(numero === valorAAdivinar){
console.log('Le atinaste')
}else{
console.log('El numero es otro')
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment