Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Check if the user is ready to play!
- confirm("Você está pronto para jogar?");
- //Exibir prompt de idade
- var age = prompt("Qual sua idade?");
- //Verificação de idade
- if (18 > age) {
- console.log("Você está liberado para jogar!");
- }
- else {
- console.log("Você tem mais de 18 anos");
- }
- console.log("Snow White and Batman were hanging out at the bus stop, waiting to go to the shops. There was a sale on and both needed some new threads. You've never really liked Batman. You walk up to him.");
- console.log("Batman olha para você.");
- var userAnswer = confirm("Are you feeling lucky, punk?");
- var yes = "userAnswer";
- console.log('Batman glares at you.');
- if (yes === userAnswer){
- // Do something
- console.log("Batman hits you very hard. It's Batman and you're you! Of course Batman wins!");
- }
- else {
- // Otherwise...
- // Do something else!
- console.log("You did not say yes to feeling lucky. Good choice! You are a winner in the game of not getting beaten up by Batman.");
- }
- //variavel feedback
- var feedback = prompt("Qual nota você daria ao meu jogo?? Criado por mim ownect!");
- //Avaliar resposta do usuario!
- if (feedback > 8) {
- console.log("his is just the beginning of my game empire. Stay tuned for more!");
- }
- else {
- console.log("I slaved away at this game and you gave me that score?! The nerve! Just you wait!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement