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