Snippet format update
To match the starter (for the migration)
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
### any
|
||||
---
|
||||
title: any
|
||||
tags: array,function,beginner
|
||||
---
|
||||
|
||||
Returns `true` if the provided predicate function returns `true` for at least one element in a collection, `false` otherwise.
|
||||
|
||||
@ -12,4 +15,4 @@ const any = (arr, fn = Boolean) => arr.some(fn);
|
||||
```js
|
||||
any([0, 1, 2, 0], x => x >= 2); // true
|
||||
any([0, 0, 1, 0]); // true
|
||||
```
|
||||
```
|
||||
Reference in New Issue
Block a user