|
|
@ -3,11 +3,14 @@ |
|
|
|
### Instructions |
|
|
|
### Instructions |
|
|
|
|
|
|
|
|
|
|
|
Create 4 functions: |
|
|
|
Create 4 functions: |
|
|
|
|
|
|
|
|
|
|
|
- `more` that takes 1 argument and adds 1 to it. |
|
|
|
- `more` that takes 1 argument and adds 1 to it. |
|
|
|
- `less` that takes 1 argument and subtracts 1 from it. |
|
|
|
- `less` that takes 1 argument and subtracts 1 from it. |
|
|
|
- `add` that takes 2 arguments and adds them together. |
|
|
|
- `add` that takes 2 arguments and adds them together. |
|
|
|
- `sub` that takes 2 arguments and subtracts the second argument from the first. |
|
|
|
- `sub` that takes 2 arguments and subtracts the second argument from the first. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All the functions must return the result of the operations specified above. |
|
|
|
|
|
|
|
|
|
|
|
### Notions |
|
|
|
### Notions |
|
|
|
|
|
|
|
|
|
|
|
- [Functions](https://nan-academy.github.io/js-training/examples/functions.js) |
|
|
|
- [Functions](https://nan-academy.github.io/js-training/examples/functions.js) |
|
|
|