mirror of https://github.com/01-edu/public.git
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.
30 lines
971 B
30 lines
971 B
5 years ago
|
## Quantifiers
|
||
|
|
||
|
### Instructions
|
||
|
|
||
|
Create three functions that receive an array and a function each:
|
||
|
|
||
|
- `every` that returns true if every element of the array respects the
|
||
|
condition of the received function and false otherwise.
|
||
|
- `some` that returns true if at least one element of the array respects the
|
||
|
condition of the received function and false otherwise.
|
||
|
- `none` that returns true if none of the elements of the array respects the
|
||
|
condition of the received function and false otherwise.
|
||
|
|
||
|
The use of `[].every` and `[].some` is forbidden for this exercise.
|
||
|
|
||
|
|
||
|
### Notions
|
||
|
|
||
4 years ago
|
- [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)
|
||
5 years ago
|
|
||
|
|
||
|
### Code provided
|
||
4 years ago
|
|
||
|
> all code provided will be added to your solution and doesn't need to be submited.
|
||
|
|
||
5 years ago
|
```js
|
||
|
Array.prototype.some = Array.prototype.every = undefined
|
||
|
```
|