Created
February 23, 2022 18:53
-
-
Save devrsantos/4298687eba1377c7e52494ecae556314 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 lista_de_pratos = ["pipoca", "macarrão", "carne", "feijão", "brigadeiro"]; | |
function entrada(item, time) { | |
if (lista_de_pratos.includes(item)) { | |
if (item == 'pipoca') { | |
if (time >= 10 && time < 20) { | |
if(time >= 11 && time < 20 ) { | |
console.log('CUIDADO PRATO MUITO QUENTE!!!!'); | |
} | |
console.log('prato pronto bom apetite') | |
} | |
if (time >= 20 && time < 30) { | |
if(time >= 21 && time < 30 ) { | |
console.log('NÃO SABE USAR UM MICROONDAS!!!!'); | |
} | |
console.log('prato queimou') | |
} | |
if (time >= 30 && time < 400) { | |
if(time >= 31 && time < 400 ) { | |
console.log('LIGUE PARA O BOMBEIRO - 193!!!!'); | |
} else { | |
console.log('KABUUMMMM') | |
} | |
} | |
if (time < 10) { | |
console.log('tempo insuficiente') | |
} | |
} | |
if (item == 'macarrão') { | |
if (time >= 8 && time < 16) { | |
if(time >= 9 && time < 16 ) { | |
console.log('CUIDADO PRATO MUITO QUENTE!!!!'); | |
} | |
console.log('prato pronto bom apetite') | |
} | |
if (time >= 16 && time < 24) { | |
if(time >= 17 && time < 24 ) { | |
console.log('NÃO SABE USAR UM MICROONDAS!!!!'); | |
} | |
console.log('prato queimou') | |
} | |
if (time >= 24 && time < 400) { | |
if(time >= 25 && time < 400 ) { | |
console.log('LIGUE PARA O BOMBEIRO - 193!!!!'); | |
} else { | |
console.log('KABUUMMMM') | |
} | |
} | |
if (time < 8) { | |
console.log('tempo insuficiente') | |
} | |
} | |
if (item == 'carne') { | |
if (time >= 10 && time < 20) { | |
if(time >= 11 && time < 20 ) { | |
console.log('CUIDADO PRATO MUITO QUENTE!!!!'); | |
} | |
console.log('prato pronto bom apetite') | |
} | |
if (time >= 20 && time < 30) { | |
if(time >= 21 && time < 30 ) { | |
console.log('NÃO SABE USAR UM MICROONDAS!!!!'); | |
} | |
console.log('prato queimou') | |
} | |
if (time >= 30 && time < 400) { | |
if(time >= 31 && time < 400 ) { | |
console.log('LIGUE PARA O BOMBEIRO - 193!!!!'); | |
} else { | |
console.log('KABUUMMMM') | |
} | |
} | |
if (time < 10) { | |
console.log('tempo insuficiente') | |
} | |
} | |
if (item == 'feijão') { | |
if (time >= 10 && time < 20) { | |
if(time >= 11 && time < 20 ) { | |
console.log('CUIDADO PRATO MUITO QUENTE!!!!'); | |
} | |
console.log('prato pronto bom apetite') | |
} | |
if (time >= 20 && time < 30) { | |
if(time >= 21 && time < 30 ) { | |
console.log('NÃO SABE USAR UM MICROONDAS!!!!'); | |
} | |
console.log('prato queimou') | |
} | |
if (time >= 30 && time < 400) { | |
if(time >= 31 && time < 400 ) { | |
console.log('LIGUE PARA O BOMBEIRO - 193!!!!'); | |
} else { | |
console.log('KABUUMMMM') | |
} | |
} | |
if (time < 10) { | |
console.log('tempo insuficiente') | |
} | |
} | |
if (item == 'brigadeiro') { | |
if (time >= 10 && time < 20) { | |
if(time >= 11 && time < 20 ) { | |
console.log('CUIDADO PRATO MUITO QUENTE!!!!'); | |
} | |
console.log('prato pronto bom apetite') | |
} | |
if (time >= 20 && time < 30) { | |
if(time >= 21 && time < 30 ) { | |
console.log('NÃO SABE USAR UM MICROONDAS!!!!'); | |
} | |
console.log('prato queimou') | |
} | |
if (time >= 30 && time < 400) { | |
if(time >= 31 && time < 400 ) { | |
console.log('LIGUE PARA O BOMBEIRO - 193!!!!'); | |
} else { | |
console.log('KABUUMMMM') | |
} | |
} | |
if (time < 10) { | |
console.log('tempo insuficiente') | |
} | |
} | |
} else { | |
console.log("Prato inexistente"); | |
} | |
} | |
entrada('macarrão', 44); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment