Skip to content

Commit 00bb007

Browse files
authored
Clarify mode can return multiple values with example (#6935)
1 parent 7cbcbe4 commit 00bb007

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

collections.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,10 @@ The `mode` method returns the [mode value](https://en.wikipedia.org/wiki/Mode_(s
14041404

14051405
// [1]
14061406

1407+
$mode = collect([1, 1, 2, 2])->mode();
1408+
1409+
// [1, 2]
1410+
14071411
<a name="method-nth"></a>
14081412
#### `nth()` {#collection-method}
14091413

0 commit comments

Comments
 (0)