| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
There are a few typical problems while you working with arrays, and your goal is to solve it.
You should implement 3 functions: max, min, and avg for searching minimal value, maximal value, and an average value of a given array.
For example:
min(1, 2, 3, 4) // returns 1;
max(1, 2, 3, 4) // returns 4;
avg(1, 2, 3, 4) // returns 2.5;Please note, that you should return 0 if no params specified or an empty array passed
Write your code in `src/index.js. All test cases are designed as “error-free”, so don't worry about handling any errors.
| Back | FazBrowse Home | New Git URL |