-
Notifications
You must be signed in to change notification settings - Fork 66
[Section 4] - Sobe exercícios #22
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
base: main
Are you sure you want to change the base?
Conversation
corrige formula IMC exercicio 6 operadores aritmeticos
modificacao enunciado exercicio 8 Operadores Aritmeticos
…-08.js Co-authored-by: Gabriel Dalseco <[email protected]>
Co-authored-by: Caról SÌlva <[email protected]>
Co-authored-by: Caról SÌlva <[email protected]>
Co-authored-by: Caról SÌlva <[email protected]>
Co-authored-by: Caról SÌlva <[email protected]>
Co-authored-by: Caról SÌlva <[email protected]>
return // Retorne o resultado aqui | ||
let number = numbers[0]; | ||
let maiorNumero; | ||
for (let index = 0; index < numbers.length; index++) { |
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.
Será que possui alguma melhor prática que tal testar com index += 1
// Desenvolva seu código nessa função | ||
return // Retorne o resultado aqui | ||
let number = numbers[0]; | ||
let maiorNumero; |
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.
Sugestão, podemos complementar a variável?
let number = numbers[0]; | ||
let maiorNumero; | ||
for (let index = 0; index < numbers.length; index++) { | ||
const element = numbers[index]; |
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.
Verificar o const dentro do for
for (let index = 0; index < numbers.length; index++) { | ||
const element = numbers[index]; | ||
if(numbers[index] > number){ | ||
number = numbers[index] |
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.
Poderia comentar este if explicando sua funcionalidade?
No description provided.