Skip to content

Commit

Permalink
add clarification about forget method return value (#9982)
Browse files Browse the repository at this point in the history
the wording here is just a little unclear. the first sentence seems to suggest that the `forget()` method does not return anything, even though it does.

you are free to assign the result to a new variable even though you don't need to.
  • Loading branch information
browner12 authored Oct 23, 2024
1 parent 4f4c78e commit 426c628
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ The `forget` method removes an item from the collection by its key:
// []

> [!WARNING]
> Unlike most other collection methods, `forget` does not return a new modified collection; it modifies the collection it is called on.
> Unlike most other collection methods, `forget` does not return a new modified collection; it modifies and returns the collection it is called on.
<a name="method-forpage"></a>
#### `forPage()` {.collection-method}
Expand Down

0 comments on commit 426c628

Please sign in to comment.