You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
783 B

## 🌟 Give it a ...rest
### Notions
- [devdocs.io/functions/rest_parameters](https://devdocs.io/javascript/functions/rest_parameters)
- [devdocs.io/javascript/global_objects/array/reduce](https://devdocs.io/javascript/global_objects/array/reduce)
### Instructions
You are now a butter passer, calculator, and barttender all-in-one robot. You
want to keep on improving but you can feel like your memory capacities are
reaching their limits. You will now try to improve what you aready have.
Declare the function `addAll` which will will return the sum of all the
arguments it recieves. Examples:
```js
console.log(addAll(1)) //1
console.log(addAll(1, 10)) //11
console.log(addAll(1, 10, 100)) //111
```
You will then do exactly the same for `subAll`, `MultAll` and `divAll`.