Diego Serafim 0 Posted May 22, 2020 Report Share Posted May 22, 2020 Preciso de ajuda com esse código, onde devo informar a gorjeta como 3% para ruim e terrível, 10% para boa e ótimo, 20% para excelente, sou novo em javascript, por isso peço a ajuda de vocês. obg ❤️ function tipPercentage(rating) { var preço = 100; var rating = (Terrivel, Boa, Ruim, Otima, Excelente); var Terrivel = preço * (3/100); var Boa = preço * (10/100); var Ruim = preço * (3/100); var Otima = preço * (10/100); var Excelente = preço * (20/100); if(preço * (rating / 100) == 0){ console.log (0); } return ((rating/100) * preço == Terrivel, Boa, Ruim, Otima, Excelente); } Quote Link to post Share on other sites
Question
Diego Serafim 0
var Boa = preço * (10/100);
Link to post
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.