Skip to content

WDPT-REMOTE-SEP-2021-Karla-Jaramillo #2577

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

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
All test passed - except Bonus Iteration 8
  • Loading branch information
karlajaramillo committed Sep 19, 2021
commit d30bb38d04751b1655cab558622a0ad7ab6eb2f6
4 changes: 2 additions & 2 deletions src/functions-and-arrays.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ function maxOfTwoNumbers(a,b) {
}
}


// Iteration #2: Find longest word
const words = ['mystery', 'brother', 'aviator', 'crocodile', 'pearl', 'orchard', 'crackpot'];

Expand Down Expand Up @@ -182,7 +181,8 @@ function avg(arr) {
// Use Function Sum to iterate over the items and sum mixed items
let sumMixedItems = sum(arr);
let avgMixedItems = sumMixedItems/totalItems;
return avgMixedItems;

return Number(avgMixedItems.toFixed(2));
}

// Iteration #5: Unique arrays
Expand Down