Created
January 24, 2016 15:16
-
-
Save Siedrix/8e81d993709af1ccab6d to your computer and use it in GitHub Desktop.
Ejercicios de la tarea 1
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
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') | |
} | |
}) |
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
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