|
1 |
| -# TASK NAME |
2 |
| - |
3 |
| -## History |
| 1 | +# Typical Arrays Problems |
4 | 2 |
|
5 | 3 | ## Task
|
| 4 | +There are a few typical problems while you working with arrays, and your goal is to solve it. |
| 5 | + |
| 6 | +You should implement 3 functions: `max`, `min`, and `avg` for searching minimal value, maximal value, and an average value of a given array. |
| 7 | + |
| 8 | +Please note, that you should return 0 if no params specified or an empty array passed |
6 | 9 |
|
7 | 10 | For example:
|
8 | 11 | ```js
|
| 12 | +min(1, 2, 3, 4) // returns 1; |
| 13 | +max(1, 2, 3, 4) // returns 4; |
| 14 | +avg(1, 2, 3, 4) // returns 2.5; |
9 | 15 | ```
|
10 | 16 |
|
11 | 17 | Write your code in `src/index.js.
|
12 | 18 | *All test cases are designed as “error-free”, so don't worry about handling any errors.*
|
13 | 19 |
|
14 | 20 | ## Prepare and test
|
15 | 21 | 1. Install [Node.js](https://nodejs.org/en/download/)
|
16 |
| -2. Fork this repository: # |
17 |
| -3. Clone your newly created repo: https://github.com/<%your_github_username%>/#/ |
18 |
| -4. Go to folder `#` |
| 22 | +2. Fork this repository: typical-arrays-problems |
| 23 | +3. Clone your newly created repo: https://github.com/<%your_github_username%>/typical-arrays-problems/ |
| 24 | +4. Go to folder `typical-arrays-problems` |
19 | 25 | 5. To install all dependencies use [`npm install`](https://docs.npmjs.com/cli/install)
|
20 | 26 | 6. Run `npm test` in the command line
|
21 | 27 | 7. You will see the number of passing and failing tests you 100% of passing tests is equal to 100p in score
|
22 | 28 |
|
23 | 29 | ## Submit to [rs app](https://app.rs.school)
|
24 | 30 | 1. Open [rs app](https://app.rs.school) and login
|
25 | 31 | 2. Go to [submit task page](https://app.rs.school/course/submit-task?course=#)
|
26 |
| -3. Select your task (#) |
| 32 | +3. Select your task (typical-arrays-problems) |
27 | 33 | 4. Press the submit button and enjoy
|
28 | 34 |
|
29 | 35 | ### Notes
|
|
0 commit comments