Skip to content

Conversation

@pallavisarwar
Copy link
Collaborator

No description provided.

@pallavisarwar pallavisarwar requested a review from dannyelcf May 6, 2024 13:01
@pallavisarwar pallavisarwar self-assigned this May 6, 2024
Comment on lines 23 to 31
let howManyEvens = 0;
let sumOfEvens = 0;
for (const num of allNumbers) {
if (num % 2 === 0) {
sumOfEvens = sumOfEvens + num;
howManyEvens = howManyEvens + 1;
}
}
const average = howManyEvens === 0 ? 0 : sumOfEvens / howManyEvens;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You must call averageEvens that you implementes in the util.js.

Ex:

const average = averageEvens(allNumbers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants