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
910 B

5 years ago
## Quantifiers
### Instructions
Create these functions which receive an array and a function each. Each element will return `true` if
- `every`: every element in the array respects the condition of the function.
- `some`: that returns `true` if at least one element in the array respects the condition of the function.
- `none`: that returns `true` if **none** of the elements in the array respects the condition of the function.
5 years ago
The use of `[].every` and `[].some` is forbidden for this exercise.
### Code provided
> The provided code will be added to your solution, and does not need to be submitted.
5 years ago
```js
Array.prototype.some = Array.prototype.every = undefined
```
### Notions
- [devdocs.io/javascript/global_objects/array/some](https://devdocs.io/javascript/global_objects/array/some)
- [devdocs.io/javascript/global_objects/array/every](https://devdocs.io/javascript/global_objects/array/every)