-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tentativa e erro #7
base: main
Are you sure you want to change the base?
Conversation
return 0 | ||
|
||
function somaSimplesArray (n1, n2, n3, n4, n5, n6) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neste execício, você deveria ter usado a variável numeros para fazer a soma
function somaValores (a, b) { | ||
|
||
var soma = a + b; | ||
return soma; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui você deveria concatenar a string "X = " com o resultado da soma
var a = 3; | ||
var b = 1; | ||
|
||
mostra(soma); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
esta função não existe
|
||
var salario; | ||
var imposto = 0; | ||
var diferenca; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Não é boa pratica declarar variáveis fora da função, se elas só estão sendo usadas nas mesmas
diferenca = salario - 2000; | ||
imposto = diferenca * 0.08; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Não está sendo tratado o caso da imposto ser isento
X mes(es) | ||
X dia(s)` | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Os execícios deveriam ficar dentro das funções e o resultado no return
0 nota(s) de R$ 2,00 | ||
0 nota(s) de R$ 1,00` | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Os execícios deveriam ficar dentro das funções e o resultado no return
return 'FALHA' | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Os execícios deveriam ficar dentro das funções e o resultado no return
|
||
var dinheiro = parseFloat(lines[0]); var notas = parseFloat(lines[1]); | ||
|
||
console.log("NOTAS:\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Não é boa pratica deixar console.log nos pull request
Apesar de não possuir nenhuma experiência, tentei dar o meu melhor.